Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # This script is sourced from all over the place to fix broken shells.
- # It does assume you have at *least* /usr/bin:/bin though.
- # Significant care is taken to be sh-compatible; if bash or zsh could be
- # required, it could be made simpler or more generic.
- has_PATH () {
- local tmp=":$PATH:"
- [ "${tmp}" != "${tmp#*:$1:}" ]
- }
- prepend_PATH () {
- has_PATH "$1" || PATH="$1:$PATH"
- }
- append_PATH () {
- has_PATH "$1" || PATH="$PATH:$1"
- }
- prepend_PATH /usr/local/bin
- prepend_PATH ~/.local/bin
- prepend_PATH ~/bin
- prepend_PATH /usr/lib/ccache
- append_PATH /usr/local/games
- append_PATH /usr/games
- export PATH
- # Known source'rs:
- # ~/.profile
- # ~/.zshrc
- # ~/.xprofile
- # ~/.xsessionrc
- # ~/.bashrc
- # ~/.config/plasma-workspace/env/path.sh
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement