void-bash-installer/files/profile/append-path.sh
2021-05-12 17:06:42 +02:00

17 lines
252 B
Bash

appendpath () {
case ":$PATH:" in
*:"$1":*)
;;
*)
PATH="${PATH:+$PATH:}$1"
esac
}
if [ $(id -u) -eq 0 ]; then
appendpath "/root/.local/bin"
else
appendpath "/home/$(id -un)/.local/bin"
fi
export PATH