From 6f30ac188d687522f56b41ebafe7e49c322af038 Mon Sep 17 00:00:00 2001 From: Case Duckworth Date: Wed, 13 Apr 2022 17:04:46 -0500 Subject: Add path_add_unsafe and change path munging --- profile/path.sh | 30 ------------------------------ 1 file changed, 30 deletions(-) delete mode 100644 profile/path.sh (limited to 'profile/path.sh') diff --git a/profile/path.sh b/profile/path.sh deleted file mode 100644 index 56bdc39..0000000 --- a/profile/path.sh +++ /dev/null @@ -1,30 +0,0 @@ -# PATH - -# add a path to PATH, but only if it's not already there -path_add() { # path_add [-a] PATH... - # -a appends (default is prepend) - APPEND=false - if [ "x$1" = "x-a" ]; then - APPEND=true - shift - fi - - for p; do - case ":$PATH:" in - *:"$p":*) ;; - *) - if $APPEND; then - PATH="$PATH:$p" - else - PATH="$p:$PATH" - fi - ;; - esac - done - - unset APPEND -} - -path_add "$HOME/bin" "$HOME/usr/bin" - -command -v luarocks >/dev/null 2>&1 && path_add "$HOME/.luarocks/bin" -- cgit 1.4.1-21-gabe81