Last active
April 19, 2023 13:58
-
-
Save kimsondrup/f22717fa7677b21d14284964fc8d06e7 to your computer and use it in GitHub Desktop.
Add to ~/.bashrc to ensure that ~/bin is in PATH if the directory exists and if not already present
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
# Checks if the "$HOME/bin" directory exists | |
if [ -d "$HOME/bin" ]; then | |
# If "$HOME/bin" is not in PATH then add it | |
case ":${PATH}:" in | |
*:"$HOME/bin":*) | |
;; | |
*) | |
export PATH="$HOME/bin:$PATH" | |
;; | |
esac | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment