Created
December 20, 2016 16:17
-
-
Save bjorand/e379e310aa7c260513e6452684026736 to your computer and use it in GitHub Desktop.
Helper for Detecting OS with bash
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
OS="$(uname -s)" | |
case $OS in | |
"Darwin") | |
echo dar | |
;; | |
"Linux") | |
echo lin | |
;; | |
*) | |
echo "Unsupported OS" | |
exit 1 | |
esac |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment