diff options
author | Roy Marples <roy@marples.name> | 2008-03-20 19:57:31 +0000 |
---|---|---|
committer | Roy Marples <roy@marples.name> | 2008-03-20 19:57:31 +0000 |
commit | 04b0acb0106acf4fadd51b8dce1fcd3ea736ce6f (patch) | |
tree | 851113d7d37d5b3cfadd59299a77085b89e22ecb /sh/functions.sh.in | |
parent | e598b7d2cdca96468a6511ccb0a0e895d3750d86 (diff) |
Fix pathing again.
Diffstat (limited to 'sh/functions.sh.in')
-rw-r--r-- | sh/functions.sh.in | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/sh/functions.sh.in b/sh/functions.sh.in index 6cb482cc..1a71fbd3 100644 --- a/sh/functions.sh.in +++ b/sh/functions.sh.in @@ -62,22 +62,19 @@ if [ -n "${ZSH_VERSION}" ]; then fi # Make a sane PATH +_PREFIX=@PREFIX@ _PKG_PREFIX=@PKG_PREFIX@ _LOCAL_PREFIX=@LOCAL_PREFIX@ -_PATH=@PREFIX@/lib/rc/bin:@PREFIX@/bin:@PREFIX@/sbin -case "${_PREFIX}" in - ""|/) _PATH="${_PATH}:/usr/bin:/usr/sbin";; - /usr) _PATH="${_PATH}:/bin:/sbin";; - *) _PATH="${_PATH}:/bin:/sbin:/usr/bin:/usr/sbin";; -esac +_LOCAL_PREFIX=${_LOCAL_PREFIX:-/usr/local} +_PATH=@PREFIX@/lib/rc/bin:/bin:/sbin:/usr/bin:/usr/sbin if [ -n "${_PKG_PREFIX}" ]; then _PATH="${_PATH}:${_PKG_PREFIX}/bin:${_PKG_PREFIX}/sbin" fi if [ -n "${_LOCAL_PREFIX}" ]; then _PATH="${_PATH}:${_LOCAL_PREFIX}/bin:${_LOCAL_PREFIX}/sbin" fi -export PATH="${_PATH}$(_sanitize_path "${PATH}")" -unset _sanitize_path _PKG_PREFIX _LOCAL_PREFIX _PATH +export PATH="${_PATH}:$(_sanitize_path "${PATH}")" +unset _sanitize_path _PREFIX _PKG_PREFIX _LOCAL_PREFIX _PATH for arg; do case "${arg}" in |