aboutsummaryrefslogtreecommitdiff
path: root/cbt
diff options
context:
space:
mode:
authorTobias Johansson <tobias.j.e.johansson@gmail.com>2016-03-06 12:31:29 +0100
committerTobias Johansson <tobias.j.e.johansson@gmail.com>2016-03-06 13:39:07 +0100
commit913cc3f6f9f352535a5e82bb6034aa9002cadb9d (patch)
tree5f7700bbdf436d41057f462f9eae8d9ae0238331 /cbt
parentf4fa7f48e6a09785eda7c24542e7e3eb0235b33e (diff)
downloadcbt-913cc3f6f9f352535a5e82bb6034aa9002cadb9d.tar.gz
cbt-913cc3f6f9f352535a5e82bb6034aa9002cadb9d.tar.bz2
cbt-913cc3f6f9f352535a5e82bb6034aa9002cadb9d.zip
Check that javac version >= 1.8
Diffstat (limited to 'cbt')
-rwxr-xr-xcbt7
1 files changed, 7 insertions, 0 deletions
diff --git a/cbt b/cbt
index c896370..b01fbbf 100755
--- a/cbt
+++ b/cbt
@@ -15,6 +15,13 @@ if [ ! $javac_installed -eq 0 ]; then
echo "You need to install javac! CBT needs it to bootstrap from Java sources into Scala." 2>&1
exit 1
fi
+javac_version=$(javac -version 2>&1 | cut -d ' ' -f 2)
+javac_version_minor=$(echo -n $javac_version | cut -d '.' -f 2)
+if [ ! "$javac_version_minor" -ge "8" ]; then
+ echo "You need to install javac version 1.8 or greater! CBT currently relies on Java 8." 2>&1
+ echo "Current javac version is $javac_version" 2>&1
+ exit 1
+fi
which ng 2>&1 > /dev/null
ng_installed=$?
which ng-server 2>&1 > /dev/null