Created
June 25, 2018 07:51
-
-
Save landsman/8e917cedde0d7177f0926694a23df35b to your computer and use it in GitHub Desktop.
todo: check environment for javabox
This file contains hidden or 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/bash | |
# check environment | |
UNAME=$(uname) | |
if [[ "$UNAME" == "Linux" ]] ; then | |
echo "Okay, you have Linux, everything should be fine." | |
elif [[ "$UNAME" == "Darwin" ]] ; then | |
echo "Warning for MacOS user: This JavaBox is tested only on Ubuntu Linux." | |
elif [[ "$UNAME" == CYGWIN* || "$UNAME" == MINGW* ]] ; then | |
echo "Windows? Bloody hell, I wish you luck. This JavaBox is tested only on Linux." | |
if [[ $(which docker) && $(docker --version) ]]; then | |
echo docker --version | |
else | |
echo "Please Install Docker" | |
exit 1 | |
fi | |
if [[ $(which docker-compose) && $(docker-compose --version) ]]; then | |
echo docker --version | |
else | |
echo "Please Install Docker" | |
exit 1 | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment