2 # Copyright (c) 2000,2004 Matthias S. Benkmann <article AT winterdrache DOT de>
3 # You may do everything with this code except misrepresent its origin.
4 # PROVIDED `AS IS' WITH ABSOLUTELY NO WARRANTY OF ANY KIND!
6 manpagesowner=man-pages
7 localedir=/usr/share/locale
12 for p in $(type -ap install) ; do
13 if [ ! $p -ef $0 ]; then
19 if [ ! -n "$DAISY_CHAIN" ]; then
20 echo Cannot find real ${0##*/} command
24 if [ $UID == 0 ]; then
25 exec $DAISY_CHAIN "$@"
28 #kill unused -c parameter if we get it
29 if [ z"$1" = z"-c" ]; then shift 1 ; fi
31 #********** test if we create directories ********************
32 if [ \( z"$1" = z"-d" \) -o \( z"$1" = z"-m" -a z"$3" = z"-d" \) ]; then
41 -o|-g|--owner|--group)
47 if [ ! -d "$a" ]; then
48 locdirs="$locdirs ""$(expr $a : "$localedir/\(.*\)")"
57 if [ ! -d "$a" ]; then
65 *) set -- "$@" "$a" ;;
69 test $notify -eq 1 -o z"$locdirs" != z && \
70 echo 1>&2 '***' install "$cmdline"
72 test $havedir -eq 0 && exit 0
74 $DAISY_CHAIN "$@" || exit $?
76 test z"$locdirs" != z &&
77 for dir in $locdirs ; do
79 for d in $(echo $locdirs | sed 's#/# #g' -) ; do
81 if [ -d $localedir/$cumuldir ]; then
82 chgrp install $localedir/$cumuldir
83 chmod g+w,o+t $localedir/$cumuldir
88 else #if "$1" != "-d" ,i.e. we do not create directories *****************
100 4755) notify=1 ; set -- "$@" "755" ;;
101 4775) notify=1 ; set -- "$@" "755" ;;
102 4711) notify=1 ; set -- "$@" "711" ;;
103 *) set -- "$@" "$a" ;;
106 -m4755) notify=1 ; set -- "$@" "-m755" ;;
107 -m4775) notify=1 ; set -- "$@" "-m755" ;;
108 -m4711) notify=1 ; set -- "$@" "-m711" ;;
109 -o|-g|--owner|--group)
115 if [ -e "$a" -a ! -O "$a" ]; then
116 if [ $(find "$a" -printf \%u) = $manpagesowner ]; then
118 set -- "$@" not_installed
126 *) set -- "$@" "$a" ;;
130 test $notify -eq 1 && echo 1>&2 '***' install "$cmdline"
132 $DAISY_CHAIN "$@" || exit $?