4f3cef0454
* ABOUT-NLS * Makefile.am * autogen.sh * configure.ac * config/config.rpath * config/mkinstalldirs * m4/Makefile.am * m4/glibc2.m4 * m4/gnupg.m4 * m4/gpgme.m4 * m4/intmax.m4 * m4/longdouble.m4 * m4/longlong.m4 * m4/printf-posix.m4 * m4/signed.m4 * m4/size_max.m4 * m4/ulonglong.m4 * m4/wchar_t.m4 * m4/wint_t.m4 * m4/xsize.m4 * po/Makefile.in.in * po/Makevars * po/bg.po * po/ca.po * po/cs.po * po/de.po * po/el.po * po/en_GB.po * po/es.po * po/fi.po * po/fr.po * po/hr.po * po/hu.po * po/it.po * po/ja.po * po/ko.po * po/nb.po * po/nl.po * po/pl.po * po/pt_BR.po * po/ru.po * po/sk.po * po/sr.po * po/stamp-po * po/sv.po * po/zh_CN.po * po/zh_TW.po * src/Makefile.am * src/codeconv.c * src/compose.c * src/exporthtml.c * src/exportldif.c * src/folder.c * src/main.c * src/manual.c * src/mh.c * src/mimeview.c * src/send_message.c * src/common/Makefile.am * src/common/fnmatch.c * src/common/fnmatch.h * src/common/fnmatch_loop.c * src/common/nntp.c * src/common/plugin.c * src/common/smtp.c * src/common/socket.c * src/common/string_match.c * src/common/sylpheed.c * src/common/utils.c * src/common/utils.h * src/common/w32_dirent.c * src/common/w32_reg.c * src/common/w32_signal.c * src/common/w32_stat.c * src/common/w32_stdio.c * src/common/w32_stdlib.c * src/common/w32_string.c * src/common/w32_time.c * src/common/w32_unistd.c * src/common/w32_wait.c * src/common/w32lib.h * src/etpan/Makefile.am * src/gtk/Makefile.am * src/plugins/clamav/Makefile.am * src/plugins/demo/Makefile.am * src/plugins/dillo_viewer/Makefile.am * src/plugins/pgpcore/Makefile.am * src/plugins/pgpcore/passphrase.c * src/plugins/pgpcore/plugin.def * src/plugins/pgpcore/sgpgme.c * src/plugins/pgpcore/sylpheed.def * src/plugins/pgpcore/version.rc * src/plugins/pgpinline/Makefile.am * src/plugins/pgpinline/plugin.def * src/plugins/pgpinline/sylpheed.def * src/plugins/pgpinline/version.rc * src/plugins/pgpmime/Makefile.am * src/plugins/pgpmime/mypgpcore.def * src/plugins/pgpmime/plugin.def * src/plugins/pgpmime/sylpheed.def * src/plugins/pgpmime/version.rc * src/plugins/spamassassin/Makefile.am Very little ;-) patch from Werner Koch, providing infrastructure for cross-compiling to Win32
150 lines
3.3 KiB
Bash
150 lines
3.3 KiB
Bash
#! /bin/sh
|
|
# mkinstalldirs --- make directory hierarchy
|
|
|
|
scriptversion=2004-02-15.20
|
|
|
|
# Original author: Noah Friedman <friedman@prep.ai.mit.edu>
|
|
# Created: 1993-05-16
|
|
# Public domain.
|
|
#
|
|
# This file is maintained in Automake, please report
|
|
# bugs to <bug-automake@gnu.org> or send patches to
|
|
# <automake-patches@gnu.org>.
|
|
|
|
errstatus=0
|
|
dirmode=""
|
|
|
|
usage="\
|
|
Usage: mkinstalldirs [-h] [--help] [--version] [-m MODE] DIR ...
|
|
|
|
Create each directory DIR (with mode MODE, if specified), including all
|
|
leading file name components.
|
|
|
|
Report bugs to <bug-automake@gnu.org>."
|
|
|
|
# process command line arguments
|
|
while test $# -gt 0 ; do
|
|
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 "$0 $scriptversion"
|
|
exit 0
|
|
;;
|
|
--) # stop option processing
|
|
shift
|
|
break
|
|
;;
|
|
-*) # unknown option
|
|
echo "$usage" 1>&2
|
|
exit 1
|
|
;;
|
|
*) # first non-opt arg
|
|
break
|
|
;;
|
|
esac
|
|
done
|
|
|
|
for file
|
|
do
|
|
if test -d "$file"; then
|
|
shift
|
|
else
|
|
break
|
|
fi
|
|
done
|
|
|
|
case $# in
|
|
0) exit 0 ;;
|
|
esac
|
|
|
|
# Solaris 8's mkdir -p isn't thread-safe. If you mkdir -p a/b and
|
|
# mkdir -p a/c at the same time, both will detect that a is missing,
|
|
# one will create a, then the other will try to create a and die with
|
|
# a "File exists" error. This is a problem when calling mkinstalldirs
|
|
# from a parallel make. We use --version in the probe to restrict
|
|
# ourselves to GNU mkdir, which is thread-safe.
|
|
case $dirmode in
|
|
'')
|
|
if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then
|
|
echo "mkdir -p -- $*"
|
|
exec mkdir -p -- "$@"
|
|
else
|
|
# 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
|
|
# exists.
|
|
test -d ./-p && rmdir ./-p
|
|
test -d ./--version && rmdir ./--version
|
|
fi
|
|
;;
|
|
*)
|
|
if mkdir -m "$dirmode" -p --version . >/dev/null 2>&1 &&
|
|
test ! -d ./--version; then
|
|
echo "mkdir -m $dirmode -p -- $*"
|
|
exec mkdir -m "$dirmode" -p -- "$@"
|
|
else
|
|
# Clean up after NextStep and OpenStep mkdir.
|
|
for d in ./-m ./-p ./--version "./$dirmode";
|
|
do
|
|
test -d $d && rmdir $d
|
|
done
|
|
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: 2
|
|
# eval: (add-hook 'write-file-hooks 'time-stamp)
|
|
# time-stamp-start: "scriptversion="
|
|
# time-stamp-format: "%:y-%02m-%02d.%02H"
|
|
# time-stamp-end: "$"
|
|
# End:
|