aboutsummaryrefslogtreecommitdiffstats
path: root/aux-build/mkinstalldirs
diff options
context:
space:
mode:
authorJonathan McCrohan <jmccrohan@gmail.com>2012-11-17 16:57:30 +0000
committerJonathan McCrohan <jmccrohan@gmail.com>2012-11-17 16:57:30 +0000
commitf2499612c5594944d3e0891259859668d35c85b2 (patch)
tree0672f579db91cfaca7a2935a86991fa67b5aae59 /aux-build/mkinstalldirs
parent429e46051dba814e7d6c74368eb1bba550222cbe (diff)
downloadlibconfig-f2499612c5594944d3e0891259859668d35c85b2.tar.gz
Imported Upstream version 1.4.9upstream/1.4.9
Diffstat (limited to '')
-rwxr-xr-xaux-build/mkinstalldirs28
1 files changed, 20 insertions, 8 deletions
diff --git a/aux-build/mkinstalldirs b/aux-build/mkinstalldirs
index 5d26a48..4191a45 100755
--- a/aux-build/mkinstalldirs
+++ b/aux-build/mkinstalldirs
@@ -1,7 +1,7 @@
#! /bin/sh
# mkinstalldirs --- make directory hierarchy
-scriptversion=2005-02-02.21
+scriptversion=2009-04-28.21; # UTC
# Original author: Noah Friedman <friedman@prep.ai.mit.edu>
# Created: 1993-05-16
@@ -11,8 +11,11 @@ scriptversion=2005-02-02.21
# 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 ...
@@ -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: