Created
December 9, 2015 14:12
-
-
Save kenkendk/a2123ae65acf261ead9f to your computer and use it in GitHub Desktop.
Test mono version
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
REQUIRED_MAJOR=2 | |
REQUIRED_MINOR=8 | |
MONO_VERSION="$(mono --version | grep 'Mono JIT compiler version ' | cut -f5 -d\ )" | |
MONO_VERSION_MAJOR="$(echo $MONO_VERSION | cut -f1 -d.)" | |
MONO_VERSION_MINOR="$(echo $MONO_VERSION | cut -f2 -d.)" | |
if [ -z "$MONO_VERSION" ] \ | |
|| [ $MONO_VERSION_MAJOR -lt $REQUIRED_MAJOR ] \ | |
|| [ $MONO_VERSION_MAJOR -eq $REQUIRED_MAJOR -a $MONO_VERSION_MINOR -lt $REQUIRED_MINOR ] | |
then | |
echo "Your mono version is $MONO_VERSION, but at least ${REQUIRED_MAJOR}.${REQUIRED_MINOR} is needed" | |
else | |
echo "Your mono version is recent enough: $MONO_VERSION" | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment