Skip to content

Instantly share code, notes, and snippets.

@landsman
Created June 25, 2018 07:51
Show Gist options
  • Save landsman/8e917cedde0d7177f0926694a23df35b to your computer and use it in GitHub Desktop.
Save landsman/8e917cedde0d7177f0926694a23df35b to your computer and use it in GitHub Desktop.
todo: check environment for javabox
#!/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