diff options
author | bill-auger <mr.j.spam.me@gmail.com> | 2020-09-25 22:48:27 -0400 |
---|---|---|
committer | bill-auger <mr.j.spam.me@gmail.com> | 2020-09-25 22:57:30 -0400 |
commit | a9c3f8646212234d92ec21d576dabb86efc1a17b (patch) | |
tree | f59aaf6b29bd3faec248681df432b839990c0bdb /libre/filesystem/profile | |
parent | f3b722d4e5d2da6368db728c13473f3deff4e4f9 (diff) | |
download | abslibre-a9c3f8646212234d92ec21d576dabb86efc1a17b.tar.gz abslibre-a9c3f8646212234d92ec21d576dabb86efc1a17b.tar.bz2 abslibre-a9c3f8646212234d92ec21d576dabb86efc1a17b.zip |
[filesystem]: upgrade to v2020-09-03
Diffstat (limited to 'libre/filesystem/profile')
-rw-r--r-- | libre/filesystem/profile | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/libre/filesystem/profile b/libre/filesystem/profile index ca39d11f2..ef3f9f68c 100644 --- a/libre/filesystem/profile +++ b/libre/filesystem/profile @@ -3,8 +3,9 @@ # Set our umask umask 022 -# Append our default paths -appendpath () { +# Append "$1" to $PATH when not already in. +# This function API is accessible to scripts in /etc/profile.d +append_path () { case ":$PATH:" in *:"$1":*) ;; @@ -13,11 +14,12 @@ appendpath () { esac } -appendpath '/usr/local/sbin' -appendpath '/usr/local/bin' -appendpath '/usr/bin' -unset -f appendpath +# Append our default paths +append_path '/usr/local/sbin' +append_path '/usr/local/bin' +append_path '/usr/bin' +# Force PATH to be environment export PATH # Load profiles from /etc/profile.d @@ -28,6 +30,9 @@ if test -d /etc/profile.d/; then unset profile fi +# Unload our profile API functions +unset -f append_path + # Source global bash config, when interactive but not posix or sh mode if test "$BASH" &&\ test "$PS1" &&\ |