vinstaller/files/profile/append-path.sh

17 lines
252 B
Bash
Raw Normal View History

2022-02-08 20:41:09 +01:00
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