diff options
author | abs <abs@pkgsrc.org> | 2005-08-23 09:33:14 +0000 |
---|---|---|
committer | abs <abs@pkgsrc.org> | 2005-08-23 09:33:14 +0000 |
commit | 4b9c2427e05f5f64765790dfa339d21ffcbe477f (patch) | |
tree | 6fb705519f18a3b5ddfe767d2988f6bd3570b255 /mk | |
parent | abb46cd4fa214194283e407dedb4d20e101ba6c2 (diff) | |
download | pkgsrc-4b9c2427e05f5f64765790dfa339d21ffcbe477f.tar.gz |
Avoid double // in the case where PREFIX is / (eg: shells/standalone-tcsh)
Diffstat (limited to 'mk')
-rw-r--r-- | mk/install/shell | 26 |
1 files changed, 21 insertions, 5 deletions
diff --git a/mk/install/shell b/mk/install/shell index f5b3789d835..fb295a2bdaa 100644 --- a/mk/install/shell +++ b/mk/install/shell @@ -1,6 +1,6 @@ #!@SH@ # -# $NetBSD: shell,v 1.2 2005/08/19 22:24:10 jlam Exp $ +# $NetBSD: shell,v 1.3 2005/08/23 09:33:14 abs Exp $ # # +SHELL - shell registration script # @@ -62,7 +62,11 @@ ADD) esac case $shell in /*) continue ;; - *) shell="${PKG_PREFIX}/$shell" ;; + *) if [ ${PKG_PREFIX} = / ] ; then + shell="/$shell" + else + shell="${PKG_PREFIX}/$shell" + fi ;; esac ${TEST} -f "$shell" || continue @@ -101,7 +105,11 @@ REMOVE) esac case $shell in /*) continue ;; - *) shell="${PKG_PREFIX}/$shell" ;; + *) if [ ${PKG_PREFIX} = / ] ; then + shell="/$shell" + else + shell="${PKG_PREFIX}/$shell" + fi ;; esac ${TEST} -f "$shell" || continue @@ -135,7 +143,11 @@ CHECK-ADD) { while read shell; do case $shell in /*) continue ;; - *) shell="${PKG_PREFIX}/$shell" ;; + *) if [ ${PKG_PREFIX} = / ] ; then + shell="/$shell" + else + shell="${PKG_PREFIX}/$shell" + fi ;; esac ${TEST} -f "$shell" || continue @@ -169,7 +181,11 @@ CHECK-REMOVE) { while read shell; do case $shell in /*) continue ;; - *) shell="${PKG_PREFIX}/$shell" ;; + *) if [ ${PKG_PREFIX} = / ] ; then + shell="/$shell" + else + shell="${PKG_PREFIX}/$shell" + fi ;; esac ${TEST} -f "$shell" || continue |