[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
install-sh upgrade from Automake
From: |
Paul Eggert |
Subject: |
install-sh upgrade from Automake |
Date: |
Wed, 10 May 2006 12:18:56 -0700 |
User-agent: |
Gnus/5.1008 (Gnus v5.10.8) Emacs/21.4 (gnu/linux) |
I installed this, in preparation for further patches in this area
prompted by Bruno Haible's mkdir -p proposal.
2006-05-10 Paul Eggert <address@hidden>
* config/install-sh: Update to Automake CVS version, as follows:
2006-04-25 Stepan Kasal <address@hidden>
* lib/install-sh: Simplify the expr implementation of dirname.
2006-04-24 Paul Eggert <address@hidden>
* lib/install-sh: Handle --, and diagnose unknown options.
--- config/install-sh 6 Apr 2006 22:40:55 -0000 1.11
+++ config/install-sh 10 May 2006 19:16:41 -0000
@@ -1,7 +1,7 @@
#!/bin/sh
# install - install a program, script, or datafile
-scriptversion=2006-01-12.21
+scriptversion=2006-04-25.22
# 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 @@ Environment variables override the defau
CHGRPPROG CHMODPROG CHOWNPROG CPPROG MKDIRPROG MVPROG RMPROG STRIPPROG
"
-while test -n "$1"; do
+while test $# -ne 0; do
case $1 in
-c) shift
continue;;
@@ -150,25 +150,33 @@ while test -n "$1"; do
--version) echo "$0 $scriptversion"; exit $?;;
- *) # When -d is used, all remaining arguments are directories to create.
- # When -t is used, the destination is already specified.
- test -n "$dir_arg$dstarg" && break
- # Otherwise, the last argument is the destination. Remove it from
address@hidden
- for arg
- do
- if test -n "$dstarg"; then
- # $@ is not empty: it contains at least $arg.
- set fnord "$@" "$dstarg"
- shift # fnord
- fi
- shift # arg
- dstarg=$arg
- done
+ --) shift
break;;
+
+ -*) echo "$0: invalid option: $1" >&2
+ exit 1;;
+
+ *) break;;
esac
done
-if test -z "$1"; then
+if test $# -ne 0 && test -z "$dir_arg$dstarg"; then
+ # When -d is used, all remaining arguments are directories to create.
+ # When -t is used, the destination is already specified.
+ # Otherwise, the last argument is the destination. Remove it from
address@hidden
+ for arg
+ do
+ if test -n "$dstarg"; then
+ # $@ is not empty: it contains at least $arg.
+ set fnord "$@" "$dstarg"
+ shift # fnord
+ fi
+ shift # arg
+ dstarg=$arg
+ done
+fi
+
+if test $# -eq 0; then
if test -z "$dir_arg"; then
echo "$0: no input file specified." >&2
exit 1
@@ -230,8 +238,7 @@ do
expr X"$dst" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
X"$dst" : 'X\(//\)[^/]' \| \
X"$dst" : 'X\(//\)$' \| \
- X"$dst" : 'X\(/\)' \| \
- . : '\(.\)' 2>/dev/null ||
+ X"$dst" : 'X\(/\)' \| . 2>/dev/null ||
echo X"$dst" |
sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
s//\1/
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- install-sh upgrade from Automake,
Paul Eggert <=