summaryrefslogtreecommitdiff
path: root/mkinstalldirs
diff options
context:
space:
mode:
authorWerner Koch <wk@gnupg.org>2013-02-25 09:55:07 +0100
committerWerner Koch <wk@gnupg.org>2013-02-25 09:55:07 +0100
commitb0ce47b730452bb28d5f46db3857c9efa5f9f51e (patch)
treeaf9c2e88d9f6092d43bf127b74a9fb8768082413 /mkinstalldirs
parent47ff6a21c6d84acebef3ff20d982a6c255a6d282 (diff)
downloadlibgpg-error-b0ce47b730452bb28d5f46db3857c9efa5f9f51e.tar.gz
Update helper scripts.
* compile, config.guess, config.rpath, config.sub, depcomp, * install-sh, mkinstalldirs: Update to current versions from gnulib. -- Some of them have not been updated here in over 8 years, time to fix that.
Diffstat (limited to 'mkinstalldirs')
-rwxr-xr-xmkinstalldirs36
1 files changed, 24 insertions, 12 deletions
diff --git a/mkinstalldirs b/mkinstalldirs
index 6fbe5e1..55d537f 100755
--- a/mkinstalldirs
+++ b/mkinstalldirs
@@ -1,7 +1,7 @@
#! /bin/sh
# mkinstalldirs --- make directory hierarchy
-scriptversion=2004-02-15.20
+scriptversion=2009-04-28.21; # UTC
# Original author: Noah Friedman <friedman@prep.ai.mit.edu>
# Created: 1993-05-16
@@ -11,8 +11,11 @@ scriptversion=2004-02-15.20
# bugs to <bug-automake@gnu.org> or send patches to
# <automake-patches@gnu.org>.
+nl='
+'
+IFS=" "" $nl"
errstatus=0
-dirmode=""
+dirmode=
usage="\
Usage: mkinstalldirs [-h] [--help] [--version] [-m MODE] DIR ...
@@ -27,7 +30,7 @@ while test $# -gt 0 ; do
case $1 in
-h | --help | --h*) # -h for help
echo "$usage"
- exit 0
+ exit $?
;;
-m) # -m PERM arg
shift
@@ -37,7 +40,7 @@ while test $# -gt 0 ; do
;;
--version)
echo "$0 $scriptversion"
- exit 0
+ exit $?
;;
--) # stop option processing
shift
@@ -78,9 +81,9 @@ case $dirmode in
echo "mkdir -p -- $*"
exec mkdir -p -- "$@"
else
- # On NextStep and OpenStep, the `mkdir' command does not
+ # On NextStep and OpenStep, the 'mkdir' command does not
# recognize any option. It will interpret all options as
- # directories to create, and then abort because `.' already
+ # directories to create, and then abort because '.' already
# exists.
test -d ./-p && rmdir ./-p
test -d ./--version && rmdir ./--version
@@ -103,13 +106,21 @@ esac
for file
do
- set fnord `echo ":$file" | sed -ne 's/^:\//#/;s/^://;s/\// /g;s/^#/\//;p'`
+ case $file in
+ /*) pathcomp=/ ;;
+ *) pathcomp= ;;
+ esac
+ oIFS=$IFS
+ IFS=/
+ set fnord $file
shift
+ IFS=$oIFS
- pathcomp=
for d
do
- pathcomp="$pathcomp$d"
+ test "x$d" = x && continue
+
+ pathcomp=$pathcomp$d
case $pathcomp in
-*) pathcomp=./$pathcomp ;;
esac
@@ -124,7 +135,7 @@ do
else
if test ! -z "$dirmode"; then
echo "chmod $dirmode $pathcomp"
- lasterr=""
+ lasterr=
chmod "$dirmode" "$pathcomp" || lasterr=$?
if test ! -z "$lasterr"; then
@@ -134,7 +145,7 @@ do
fi
fi
- pathcomp="$pathcomp/"
+ pathcomp=$pathcomp/
done
done
@@ -146,5 +157,6 @@ exit $errstatus
# eval: (add-hook 'write-file-hooks 'time-stamp)
# time-stamp-start: "scriptversion="
# time-stamp-format: "%:y-%02m-%02d.%02H"
-# time-stamp-end: "$"
+# time-stamp-time-zone: "UTC"
+# time-stamp-end: "; # UTC"
# End: