Created
August 12, 2022 12:27
-
-
Save thuyetbao/51677693059ced9183a5020c943c02d1 to your computer and use it in GitHub Desktop.
Question: How to detect the Operation from a Bash script?
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
# Get idea on: https://stackoverflow.com/a/18434831 | |
case "$OSTYPE" in | |
msys*) | |
echo "OS: Window" | |
export PY_CMD=python | |
export ACTIVATE_DIR=Scripts | |
;; | |
linux*) | |
echo "OS: Linux" | |
export PY_CMD=/usr/local/bin/python3.9 | |
export ACTIVATE_DIR=bin | |
;; | |
*) | |
echo "Not supported for OS $OSTYPE" | |
;; | |
esac |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment