ikarus/mkinstalldirs

100 lines
1.8 KiB
Plaintext
Raw Normal View History

major restructuring to support autotools added: Makefile Makefile.am Makefile.in aclocal.m4 config.guess config.sub configure configure.ac depcomp install-sh missing mkinstalldirs src/Makefile.am src/Makefile.in src/scheme/ renamed: bin/ikarus-collect.c => src/ikarus-collect.c bin/ikarus-data.h => src/ikarus-data.h bin/ikarus-enter.s => src/ikarus-enter.s bin/ikarus-exec.c => src/ikarus-exec.c bin/ikarus-fasl.c => src/ikarus-fasl.c bin/ikarus-flonums.c => src/ikarus-flonums.c bin/ikarus-main.c => src/ikarus-main.c bin/ikarus-numerics.c => src/ikarus-numerics.c bin/ikarus-print.c => src/ikarus-print.c bin/ikarus-runtime.c => src/ikarus-runtime.c bin/ikarus-symbol-table.c => src/ikarus-symbol-table.c bin/ikarus-verify-integrity.c => src/ikarus-verify-integrity.c bin/ikarus-weak-pairs.c => src/ikarus-weak-pairs.c bin/ikarus-winmmap.c => src/ikarus-winmmap.c bin/ikarus-winmmap.h => src/ikarus-winmmap.h src/asm-tests.ss => src/scheme/asm-tests.ss src/dotests.ss => src/scheme/dotests.ss src/ikarus => src/scheme/ikarus src/ikarus.apply.ss => src/scheme/ikarus.apply.ss src/ikarus.bytevectors.ss => src/scheme/ikarus.bytevectors.ss src/ikarus.cafe.ss => src/scheme/ikarus.cafe.ss src/ikarus.chars.ss => src/scheme/ikarus.chars.ss src/ikarus.code-objects.ss => src/scheme/ikarus.code-objects.ss src/ikarus.codecs.ss => src/scheme/ikarus.codecs.ss src/ikarus.collect.ss => src/scheme/ikarus.collect.ss src/ikarus.command-line.ss => src/scheme/ikarus.command-line.ss src/ikarus.compiler.altcogen.ss => src/scheme/ikarus.compiler.altcogen.ss src/ikarus.compiler.ss => src/scheme/ikarus.compiler.ss src/ikarus.control.ss => src/scheme/ikarus.control.ss src/ikarus.date-string.ss => src/scheme/ikarus.date-string.ss src/ikarus.fasl.ss => src/scheme/ikarus.fasl.ss src/ikarus.fasl.write.ss => src/scheme/ikarus.fasl.write.ss src/ikarus.fixnums.ss => src/scheme/ikarus.fixnums.ss src/ikarus.guardians.ss => src/scheme/ikarus.guardians.ss src/ikarus.handlers.ss => src/scheme/ikarus.handlers.ss src/ikarus.hash-tables.ss => src/scheme/ikarus.hash-tables.ss src/ikarus.intel-assembler.ss => src/scheme/ikarus.intel-assembler.ss src/ikarus.io-ports.ss => src/scheme/ikarus.io-ports.ss src/ikarus.io-primitives.ss => src/scheme/ikarus.io-primitives.ss src/ikarus.io-primitives.unsafe.ss => src/scheme/ikarus.io-primitives.unsafe.ss src/ikarus.io.input-files.ss => src/scheme/ikarus.io.input-files.ss src/ikarus.io.input-strings.ss => src/scheme/ikarus.io.input-strings.ss src/ikarus.io.output-files.ss => src/scheme/ikarus.io.output-files.ss src/ikarus.io.output-strings.ss => src/scheme/ikarus.io.output-strings.ss src/ikarus.lists.ss => src/scheme/ikarus.lists.ss src/ikarus.load.ss => src/scheme/ikarus.load.ss src/ikarus.main.ss => src/scheme/ikarus.main.ss src/ikarus.multiple-values.ss => src/scheme/ikarus.multiple-values.ss src/ikarus.numerics.ss => src/scheme/ikarus.numerics.ss src/ikarus.pairs.ss => src/scheme/ikarus.pairs.ss src/ikarus.posix.ss => src/scheme/ikarus.posix.ss src/ikarus.predicates.ss => src/scheme/ikarus.predicates.ss src/ikarus.pretty-print.ss => src/scheme/ikarus.pretty-print.ss src/ikarus.promises.ss => src/scheme/ikarus.promises.ss src/ikarus.reader.ss => src/scheme/ikarus.reader.ss src/ikarus.records.procedural.ss => src/scheme/ikarus.records.procedural.ss src/ikarus.singular-objects.ss => src/scheme/ikarus.singular-objects.ss src/ikarus.sort.ss => src/scheme/ikarus.sort.ss src/ikarus.strings.ss => src/scheme/ikarus.strings.ss src/ikarus.structs.ss => src/scheme/ikarus.structs.ss src/ikarus.symbols.ss => src/scheme/ikarus.symbols.ss src/ikarus.timer.ss => src/scheme/ikarus.timer.ss src/ikarus.trace.ss => src/scheme/ikarus.trace.ss src/ikarus.transcoders.ss => src/scheme/ikarus.transcoders.ss src/ikarus.unicode-data.ss => src/scheme/ikarus.unicode-data.ss src/ikarus.vectors.ss => src/scheme/ikarus.vectors.ss src/ikarus.writer.ss => src/scheme/ikarus.writer.ss src/makefile.ss => src/scheme/makefile.ss src/pass-specify-rep-primops.ss => src/scheme/pass-specify-rep-primops.ss src/pass-specify-rep.ss => src/scheme/pass-specify-rep.ss src/psyntax.builders.ss => src/scheme/psyntax.builders.ss src/psyntax.compat.ss => src/scheme/psyntax.compat.ss src/psyntax.config.ss => src/scheme/psyntax.config.ss src/psyntax.expander.ss => src/scheme/psyntax.expander.ss src/psyntax.internal.ss => src/scheme/psyntax.internal.ss src/psyntax.library-manager.ss => src/scheme/psyntax.library-manager.ss src/r6rs-records.ss => src/scheme/r6rs-records.ss src/rationalize.ss => src/scheme/rationalize.ss src/run-tests.ss => src/scheme/run-tests.ss src/set-operations.ss => src/scheme/set-operations.ss src/tests => src/scheme/tests src/tests.libraries.ss => src/scheme/tests.libraries.ss src/todo-r6rs.ss => src/scheme/todo-r6rs.ss src/unicode => src/scheme/unicode modified: src/ikarus.boot
2007-10-17 19:59:37 -04:00
#! /bin/sh
# mkinstalldirs --- make directory hierarchy
# Author: Noah Friedman <friedman@prep.ai.mit.edu>
# Created: 1993-05-16
# Public domain
errstatus=0
dirmode=""
usage="\
Usage: mkinstalldirs [-h] [--help] [-m mode] dir ..."
# 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
shift
test $# -eq 0 && { echo "${usage}" 1>&2; exit 1; }
dirmode="${1}"
shift ;;
-- ) shift; break ;; # stop option processing
-* ) echo "${usage}" 1>&2; exit 1 ;; # unknown option
* ) break ;; # first non-opt arg
esac
done
for file
do
if test -d "$file"; then
shift
else
break
fi
done
case $# in
0) exit 0 ;;
esac
case $dirmode in
'')
if mkdir -p -- . 2>/dev/null; then
echo "mkdir -p -- $*"
exec mkdir -p -- "$@"
fi ;;
*)
if mkdir -m "$dirmode" -p -- . 2>/dev/null; then
echo "mkdir -m $dirmode -p -- $*"
exec mkdir -m "$dirmode" -p -- "$@"
fi ;;
esac
for file
do
set fnord `echo ":$file" | sed -ne 's/^:\//#/;s/^://;s/\// /g;s/^#/\//;p'`
shift
pathcomp=
for d
do
pathcomp="$pathcomp$d"
case "$pathcomp" in
-* ) pathcomp=./$pathcomp ;;
esac
if test ! -d "$pathcomp"; then
echo "mkdir $pathcomp"
mkdir "$pathcomp" || lasterr=$?
if test ! -d "$pathcomp"; then
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
fi
fi
pathcomp="$pathcomp/"
done
done
exit $errstatus
# Local Variables:
# mode: shell-script
# sh-indentation: 3
# End:
# mkinstalldirs ends here