Skip to content

Instantly share code, notes, and snippets.

@apemon
Created August 23, 2019 19:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save apemon/4b58085e0c7650f02ef0c7446c215252 to your computer and use it in GitHub Desktop.
Save apemon/4b58085e0c7650f02ef0c7446c215252 to your computer and use it in GitHub Desktop.
if [[ "$OSTYPE" == "linux-gnu" ]]; then
if which yum &>/dev/null; then
PACKAGE_MANAGER="yum"
...
fi
elif [[ "$OSTYPE" == "darwin"* ]]; then
if which brew &>/dev/null; then
PACKAGE_MANAGER="brew"
...
fi
else
echo "Unknown OS. Abort."
exit 1
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment