Created
March 4, 2022 23:06
-
-
Save dathanb/e3c949f9dff26bea5d8709caa5aaa13f to your computer and use it in GitHub Desktop.
Detect whether ~/bin is in the PATH
This file contains hidden or 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
# Install to ~/bin if it's already on the path; otherwise install to /usr/local/bin | |
case ":$PATH:" in | |
*":$HOME/bin/:"*|*":$HOME/bin:"*) | |
INSTALL_DIR="$HOME/bin" | |
;; | |
*) | |
INSTALL_DIR=/usr/local/bin | |
;; | |
esac |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment