X-Git-Url: https://code.citadel.org/?a=blobdiff_plain;f=webcit%2Finstall-sh;h=dd97db7aa1cae9655149aad9d21c6cf42476c0da;hb=a8e44d31659376694a4c0c820b856722485049c2;hp=1a8353401c4223bf93e7d7dd76164de5400be672;hpb=74f5c635f43239bcb54ef371809680136f0e56af;p=citadel.git diff --git a/webcit/install-sh b/webcit/install-sh index 1a8353401..dd97db7aa 100755 --- a/webcit/install-sh +++ b/webcit/install-sh @@ -1,7 +1,7 @@ #!/bin/sh # install - install a program, script, or datafile -scriptversion=2005-02-02.21 +scriptversion=2004-09-10.20 # This originates from X11R5 (mit/util/scripts/install.sh), which was # later released in X11R6 (xc/config/util/install.sh) with the @@ -109,7 +109,7 @@ while test -n "$1"; do shift continue;; - --help) echo "$usage"; exit $?;; + --help) echo "$usage"; exit 0;; -m) chmodcmd="$chmodprog $2" shift @@ -134,7 +134,7 @@ while test -n "$1"; do shift continue;; - --version) echo "$0 $scriptversion"; exit $?;; + --version) echo "$0 $scriptversion"; exit 0;; *) # When -d is used, all remaining arguments are directories to create. # When -t is used, the destination is already specified. @@ -213,7 +213,7 @@ do fi # This sed command emulates the dirname command. - dstdir=`echo "$dst" | sed -e 's,/*$,,;s,[^/]*$,,;s,/*$,,;s,^$,.,'` + dstdir=`echo "$dst" | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'` # Make sure that the destination directory exists. @@ -226,8 +226,7 @@ do oIFS=$IFS # Some sh's can't handle IFS=/ for some reason. IFS='%' - set x `echo "$dstdir" | sed -e 's@/@%@g' -e 's@^%@/@'` - shift + set - `echo "$dstdir" | sed -e 's@/@%@g' -e 's@^%@/@'` IFS=$oIFS pathcomp= @@ -296,7 +295,7 @@ do || $doit $mvcmd -f "$dstdir/$dstfile" "$rmtmp" 2>/dev/null \ || { echo "$0: cannot unlink or rename $dstdir/$dstfile" >&2 - (exit 1); exit 1 + (exit 1); exit } else : @@ -307,12 +306,12 @@ do $doit $mvcmd "$dsttmp" "$dstdir/$dstfile" } } - fi || { (exit 1); exit 1; } + fi || { (exit 1); exit; } done # The final little trick to "correctly" pass the exit status to the exit trap. { - (exit 0); exit 0 + (exit 0); exit } # Local variables: