Created
March 19, 2021 12:13
-
-
Save deven96/a13d9c3356dc0be27b3ca32145e5edd5 to your computer and use it in GitHub Desktop.
Check OS
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
#!/bin/bash | |
function checkOS { | |
unameOut="$(uname -s)" | |
case "${unameOut}" in | |
Linux*) machine=Linux;; | |
Darwin*) machine=Mac;; | |
*) echo "Cannot run on unsupported machine ${unameOut}" && exit 1; | |
esac | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment