3 # Copyright (c) 2000 Matthias S. Benkmann <article AT winterdrache DOT de>
4 # You may do everything with this code except misrepresent its origin.
5 # PROVIDED `AS IS' WITH ABSOLUTELY NO WARRANTY OF ANY KIND!
7 # Copyright (C) 2014 Steve Youngs <steve@steveyoungs.com>
8 # Optionally nuke locale directories.
10 watchdir=/usr/share/locale
14 for p in $(type -ap mkdir) ; do
15 if [ ! $p -ef $0 ]; then
21 if [ ! -n "$DAISY_CHAIN" ]; then
22 echo 1>&2 '***' Cannot find real ${0##*/} command
26 if [ $UID == 0 ]; then
27 echo 1>&2 '***' $(dirname $0) should not be in root\'s \$PATH
28 echo 1>&2 '***' Call '"'$DAISY_CHAIN $@'"' directly.
41 dirs="$dirs ""$(expr $a : "$watchdir/\(.*\)")"
44 (*) set -- "$@" "$a" ;;
48 exec $DAISY_CHAIN "$@" || exit $?
51 echo 1>&2 '***' mkdir "$cmdline"
54 for d in $(echo $dirs | sed 's#/# #g' -) ; do
56 if [ $SUPPRESSLOCALEDIR -eq 0 ]; then
57 echo 1>&2 '***' Possible root intervention required
58 echo 1>&2 '***' install -vdm1775 -oroot -ginstall $watchdir/$cumuldir
60 echo 1>&2 '***' Locale directory creation suppressed
61 echo 1>&2 '***' $watchdir/$cumuldir
62 rm -rf $watchdir/$cumuldir