From 78937d91153a87f356b60254cbaad7fa6b745d0f Mon Sep 17 00:00:00 2001 From: teldra Date: Sun, 18 Apr 2021 14:46:33 +0200 Subject: [PATCH] fixes --- files/profile/append-path.sh | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/files/profile/append-path.sh b/files/profile/append-path.sh index 86bd8bd..a44721e 100644 --- a/files/profile/append-path.sh +++ b/files/profile/append-path.sh @@ -1 +1,10 @@ -appendpath '${HOME}/local/bin' \ No newline at end of file +appendpath () { + case ":$PATH:" in + *:"$1":*) + ;; + *) + PATH="${PATH:+$PATH:}$1" + esac +} + +appendpath '${HOME}/local/bin'