Skip to content

Instantly share code, notes, and snippets.

@autosquid
Created April 20, 2017 13:23
Show Gist options
  • Save autosquid/3778f46005552048e7e9598ccdfe6ba9 to your computer and use it in GitHub Desktop.
Save autosquid/3778f46005552048e7e9598ccdfe6ba9 to your computer and use it in GitHub Desktop.
script to determine os type
# OS specific support (must be 'true' or 'false').
cygwin=false
msys=false
darwin=false
case "`uname`" in
CYGWIN* )
cygwin=true
;;
Darwin* )
darwin=true
;;
MINGW* )
msys=true
;;
esac
# For Cygwin, ensure paths are in UNIX format before anything is touched.
if $cygwin ; then
[ -n "$JAVA_HOME" ] && JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment