# Created: 1993-05-16
# Public domain.
-version="mkinstalldirs 2003-06-02"
+scriptversion=2003-06-14.23
errstatus=0
dirmode=""
# 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 ;;
- --version) echo "$version"; exit 0;;
- --) shift; break ;; # stop option processing
- -*) echo "${usage}" 1>&2; exit 1 ;; # unknown option
- *) break ;; # first non-opt arg
+ test $# -eq 0 && { echo "$usage" 1>&2; exit 1; }
+ dirmode=$1
+ shift
+ ;;
+ --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
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
for d
do
pathcomp="$pathcomp$d"
- case "$pathcomp" in
+ case $pathcomp in
-*) pathcomp=./$pathcomp ;;
esac
mkdir "$pathcomp" || lasterr=$?
if test ! -d "$pathcomp"; then
- errstatus=$lasterr
+ errstatus=$lasterr
else
- if test ! -z "$dirmode"; then
- echo "chmod $dirmode $pathcomp"
-
- lasterr=""
- chmod "$dirmode" "$pathcomp" || lasterr=$?
-
- if test ! -z "$lasterr"; then
- errstatus=$lasterr
- fi
- fi
+ if test ! -z "$dirmode"; then
+ echo "chmod $dirmode $pathcomp"
+ lasterr=""
+ chmod "$dirmode" "$pathcomp" || lasterr=$?
+
+ if test ! -z "$lasterr"; then
+ errstatus=$lasterr
+ fi
+ fi
fi
fi
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:
-# $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.
$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
$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
# 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.