summaryrefslogtreecommitdiff
path: root/build-aux/mkinstalldirs
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2005-07-01 13:17:41 +0000
committerKarl Berry <karl@freefriends.org>2005-07-01 13:17:41 +0000
commit3d88f352de75980fe554c902a06ab4b5f51c8f96 (patch)
tree019629c4ace50a62eae761b897ac5796b6deeb23 /build-aux/mkinstalldirs
parentf97a516c0e76e513d42e1ccf7788246c4b1a9cca (diff)
downloadgnulib-3d88f352de75980fe554c902a06ab4b5f51c8f96.tar.gz
autoupdate
Diffstat (limited to 'build-aux/mkinstalldirs')
-rwxr-xr-xbuild-aux/mkinstalldirs22
1 files changed, 15 insertions, 7 deletions
diff --git a/build-aux/mkinstalldirs b/build-aux/mkinstalldirs
index 7f4333b313..259dbfcd35 100755
--- a/build-aux/mkinstalldirs
+++ b/build-aux/mkinstalldirs
@@ -1,7 +1,7 @@
#! /bin/sh
# mkinstalldirs --- make directory hierarchy
-scriptversion=2005-05-14.22
+scriptversion=2005-06-29.22
# Original author: Noah Friedman <friedman@prep.ai.mit.edu>
# Created: 1993-05-16
@@ -12,7 +12,7 @@ scriptversion=2005-05-14.22
# <automake-patches@gnu.org>.
errstatus=0
-dirmode=""
+dirmode=
usage="\
Usage: mkinstalldirs [-h] [--help] [--version] [-m MODE] DIR ...
@@ -103,13 +103,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 +132,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 +142,7 @@ do
fi
fi
- pathcomp="$pathcomp/"
+ pathcomp=$pathcomp/
done
done