summaryrefslogtreecommitdiff
path: root/sh/profile
diff options
context:
space:
mode:
Diffstat (limited to 'sh/profile')
-rw-r--r--sh/profile36
1 files changed, 22 insertions, 14 deletions
diff --git a/sh/profile b/sh/profile
index f8cbd7e..6119dff 100644
--- a/sh/profile
+++ b/sh/profile
@@ -85,48 +85,56 @@ export SRCDIR="$HOME/.local/src"
export SYSPATH="$PATH"
# NEW PATH
+addtopath () {
+ if [ -n "$PATH" ]; then
+ PATH="$@:$PATH"
+ else
+ PATH="$@"
+ fi
+}
+
unset PATH
if [ -d "$HOME/.local/bin/testing" ]; then
- PATH="$HOME/.local/bin/testing"
+ addtopath "$HOME/.local/bin/testing"
fi
if [ -d "$HOME/.local/bin/shortcmds" ]; then
- PATH="$PATH:$HOME/.local/bin/shortcmds"
+ addtopath "$HOME/.local/bin/shortcmds"
fi
if [ -d "$HOME/.local/bin/generics" ]; then
- PATH="$PATH:$HOME/.local/bin/generics"
+ addtopath "$HOME/.local/bin/generics"
fi
if [ -d "$HOME/.local/bin/scripts" ]; then
- PATH="$PATH:$HOME/.local/bin/scripts"
+ addtopath "$HOME/.local/bin/scripts"
fi
if [ -d "$HOME/.local/bin/sp" ]; then
- PATH="$PATH:$HOME/.local/bin/sp"
+ addtopath "$HOME/.local/bin/sp"
fi
if [ -d "$HOME/.local/bin/blocks" ]; then
- PATH="$PATH:$HOME/.local/bin/blocks"
+ addtopath "$HOME/.local/bin/blocks"
fi
if [ -d "$HOME/.local/bin/ignore" ]; then
- PATH="$PATH:$HOME/.local/bin/ignore"
+ addtopath "$HOME/.local/bin/ignore"
fi
if [ -d "$HOME/local/bin/volsv" ]; then
- PATH="$PATH:$HOME/.local/volsv"
+ addtopath "$HOME/.local/volsv"
fi
if [ -d "$HOME/.local/bin" ]; then
- PATH="$PATH:$HOME/.local/bin"
+ addtopath "$HOME/.local/bin"
fi
if [ -d "$HOME/.local/bin/flatpak-sc" ]; then
- PATH="$PATH:$HOME/.local/bin/flatpak-sc"
+ addtopath "$HOME/.local/bin/flatpak-sc"
fi
if [ -d "$HOME/.local/bin/flatpak/exports/bin" ]; then
- PATH="$PATH:$HOME/.local/share/flatpak/exports/bin/"
+ addtopath "$HOME/.local/share/flatpak/exports/bin/"
fi
if [ -d "$CARGO_HOME/bin" ]; then
- PATH="$PATH:$CARGO_HOME/bin"
+ addtopath "$CARGO_HOME/bin"
fi
if [ -d "$GOPATH/bin" ]; then
- PATH="$PATH:$GOPATH/bin"
+ addtopath "$GOPATH/bin"
fi
if [ -d "/var/lib/flatpak/exports/bin" ]; then
- PATH="$PATH:/var/lib/flatpak/exports/bin"
+ addtopath "/var/lib/flatpak/exports/bin"
fi
# MERGE PATHS