Mercurial > hg > octave-lyh > gnulib-hg
changeset 4402:703b52f7f7ea
update mkinstalldirs from automake
author | Karl Berry <karl@freefriends.org> |
---|---|
date | Sun, 22 Jun 2003 22:47:40 +0000 |
parents | 493e0f7fc4f7 |
children | 8c6310a47379 |
files | config/ChangeLog config/mkinstalldirs config/srclist.txt |
diffstat | 3 files changed, 60 insertions(+), 30 deletions(-) [+] |
line wrap: on
line diff
--- a/config/ChangeLog +++ b/config/ChangeLog @@ -1,3 +1,8 @@ +2003-06-22 <karl@gnu.org> + + * srclist.txt: update mkinstalldirs from automake. + * mkinstalldirs: update. + 2003-06-18 <karl@gnu.org> * config.{guess,sub}: update from prep.
--- a/config/mkinstalldirs +++ b/config/mkinstalldirs @@ -4,7 +4,7 @@ # Created: 1993-05-16 # Public domain. -version="mkinstalldirs 2003-06-02" +scriptversion=2003-06-14.23 errstatus=0 dirmode="" @@ -18,22 +18,35 @@ # process command line arguments while test $# -gt 0 ; do - case "${1}" in - -h | --help | --h*) # -h for help - echo "${usage}" 1>&2; exit 0 ;; - -m) # -m PERM arg + case $1 in + -h | --help | --h*) # -h for help + echo "$usage" + exit 0 + ;; + -m) # -m PERM arg + shift + test $# -eq 0 && { echo "$usage" 1>&2; exit 1; } + dirmode=$1 shift - test $# -eq 0 && { echo "${usage}" 1>&2; exit 1; } - dirmode="${1}" - shift ;; - --version) echo "$version"; exit 0;; - --) shift; break ;; # stop option processing - -*) echo "${usage}" 1>&2; exit 1 ;; # unknown option - *) break ;; # first non-opt arg + ;; + --version) + echo "$0 $scriptversion" + exit 0 + ;; + --) # stop option processing + shift + break + ;; + -*) # unknown option + echo "$usage" 1>&2 + exit 1 + ;; + *) # first non-opt arg + break + ;; esac done -# no `for var; do', it breaks on Solaris 2.7 (at least). for file do if test -d "$file"; then @@ -52,12 +65,14 @@ if mkdir -p -- . 2>/dev/null; then echo "mkdir -p -- $*" exec mkdir -p -- "$@" - fi ;; + fi + ;; *) if mkdir -m "$dirmode" -p -- . 2>/dev/null; then echo "mkdir -m $dirmode -p -- $*" exec mkdir -m "$dirmode" -p -- "$@" - fi ;; + fi + ;; esac for file @@ -69,7 +84,7 @@ for d do pathcomp="$pathcomp$d" - case "$pathcomp" in + case $pathcomp in -*) pathcomp=./$pathcomp ;; esac @@ -79,18 +94,17 @@ mkdir "$pathcomp" || lasterr=$? if test ! -d "$pathcomp"; then - errstatus=$lasterr + errstatus=$lasterr else - if test ! -z "$dirmode"; then - echo "chmod $dirmode $pathcomp" + if test ! -z "$dirmode"; then + echo "chmod $dirmode $pathcomp" + lasterr="" + chmod "$dirmode" "$pathcomp" || lasterr=$? - lasterr="" - chmod "$dirmode" "$pathcomp" || lasterr=$? - - if test ! -z "$lasterr"; then - errstatus=$lasterr - fi - fi + if test ! -z "$lasterr"; then + errstatus=$lasterr + fi + fi fi fi @@ -99,3 +113,12 @@ done exit $errstatus + +# Local Variables: +# mode: shell-script +# sh-indentation: 2 +# eval: (add-hook 'write-file-hooks 'time-stamp) +# time-stamp-start: "scriptversion=" +# time-stamp-format: "%:y-%02m-%02d.%02H" +# time-stamp-end: "$" +# End:
--- a/config/srclist.txt +++ b/config/srclist.txt @@ -1,4 +1,4 @@ -# $Id: srclist.txt,v 1.14 2003-06-04 20:09:47 eggert Exp $ +# $Id: srclist.txt,v 1.15 2003-06-22 22:47:40 karl Exp $ # Files for which we are not the source. See ./srclistvars.sh for the # variable definitions. @@ -9,7 +9,7 @@ $AUTOMAKE/lib/install-sh config $AUTOMAKE/lib/mdate-sh config $AUTOMAKE/lib/missing config -# after next release $AUTOMAKE/lib/mkinstalldirs config +$AUTOMAKE/lib/mkinstalldirs config # $TEXINFOSRC/doc/texinfo.tex config @@ -21,8 +21,6 @@ $GETTEXT/gettext.h lib # $LIBCSRC/sysdeps/generic/strtoll.c lib gpl -#$LIBCSRC/malloc/obstack.c lib gpl -#$LIBCSRC/posix/getopt.c lib gpl $LIBCSRC/posix/getopt.h lib gpl $LIBCSRC/posix/getopt1.c lib gpl $LIBCSRC/posix/regex.h lib gpl @@ -30,6 +28,10 @@ # This can be uncommented after libc mktime is fixed. #$LIBCSRC/time/mktime.c lib gpl # +# These are close, but ... +#$LIBCSRC/malloc/obstack.c lib gpl +#$LIBCSRC/posix/getopt.c lib gpl +# # - libc/sysdeps/generic has memcpy.c, memmove.c, strcasecmp.c, but they # are totally different implementations. # - Likewise libc/string/strerror.c.