#!/bin/bash

scala_version=`scalac -version 2>&1 | grep "^Scala compiler version" | grep -oP '\K(\d+\.\d+\.\d+)'`
[[ "$scala_version" = "2.10.3" ]] && exit 0 || { echo "Incorrect version: $scala_version."; exit 1; }

#!/bin/bash

status=0
scalac_version=`scalac -version 2>&1 | grep "^Scala compiler version" | grep -oP '\K(\d+\.\d+\.\d+)'`
[[ "$scalac_version" = "2.10.3" ]] || { echo "Incorrect scalac version: $scalac_version."; status=1; }

scala_version=`scala -version 2>&1 | grep "^Scala code runner" | grep -oP '\K(\d+\.\d+\.\d+)'`
[[ "$scala_version" = "2.10.3" ]] || { echo "Incorrect scala version: $scala_version."; status=1; }

exit $status

Test scala version in addition to scalac version.
Test scala version in addition to scalac version.
