Last active
March 2, 2020 17:54
-
-
Save bcomnes/13711d12237e866de5ca to your computer and use it in GitHub Desktop.
Run different sh scripts depending on system: http://stackoverflow.com/a/17072017/1287889
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 | |
if [ "$(uname)" == "Darwin" ]; then | |
# Do something under Mac OS X platform | |
elif [ "$(expr substr $(uname -s) 1 5)" == "Linux" ]; then | |
# Do something under GNU/Linux platform | |
elif [ "$(expr substr $(uname -s) 1 10)" == "MINGW32_NT" ]; then | |
# Do something under Windows NT platform | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment