1
0
Fork 0

Replace .zprofile with .profile

This commit is contained in:
Jeremy Kaplan 2021-10-31 12:38:23 -07:00
commit 4184624d40
3 changed files with 25 additions and 14 deletions

24
etc/profile Normal file
View file

@ -0,0 +1,24 @@
source_if() {
if [ -e "$1" ]; then
source "$1"
fi
}
path_if() {
if [ -d "$1" ]; then
case ":$PATH:" in
*:"$1":*)
;;
*)
PATH="${1}${PATH:+:$PATH}"
esac
fi
}
source_if "${HOME}/.nix-profile/etc/profile.d/nix.sh"
path_if "$HOME/bin"
path_if "$HOME/.local/bin"
unset -f source_if
unset -f path_if