void-bash-installer/files/profile/append-path.sh

17 lines
252 B
Bash
Raw Normal View History

2021-04-18 14:46:33 +02:00
appendpath () {
case ":$PATH:" in
*:"$1":*)
;;
*)
PATH="${PATH:+$PATH:}$1"
esac
}
2021-05-12 17:06:42 +02:00
if [ $(id -u) -eq 0 ]; then
appendpath "/root/.local/bin"
else
appendpath "/home/$(id -un)/.local/bin"
fi
2021-05-12 10:02:05 +02:00
export PATH