provide uninstall command
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@18686 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
@@ -4,6 +4,7 @@
|
|||||||
#
|
#
|
||||||
# install preformatted manual pages
|
# install preformatted manual pages
|
||||||
|
|
||||||
|
cmd="$1"; shift
|
||||||
INSTALL_DATA="$1"; shift
|
INSTALL_DATA="$1"; shift
|
||||||
mkinstalldirs="$1"; shift
|
mkinstalldirs="$1"; shift
|
||||||
srcdir="$1"; shift
|
srcdir="$1"; shift
|
||||||
@@ -19,14 +20,22 @@ for f in "$@"; do
|
|||||||
c="$base.cat$section"
|
c="$base.cat$section"
|
||||||
|
|
||||||
if test "$catinstall" = yes -a -f "$srcdir/$c"; then
|
if test "$catinstall" = yes -a -f "$srcdir/$c"; then
|
||||||
|
if test "$cmd" = install ; then
|
||||||
if test \! -d "$catdir"; then
|
if test \! -d "$catdir"; then
|
||||||
eval "$mkinstalldirs $catdir"
|
eval "$mkinstalldirs $catdir"
|
||||||
fi
|
fi
|
||||||
eval "echo $INSTALL_DATA $srcdir/$c $catdir/$base.$suffix"
|
eval "echo $INSTALL_DATA $srcdir/$c $catdir/$base.$suffix"
|
||||||
eval "$INSTALL_DATA $srcdir/$c $catdir/$base.$suffix"
|
eval "$INSTALL_DATA $srcdir/$c $catdir/$base.$suffix"
|
||||||
|
elif test "$cmd" = uninstall ; then
|
||||||
|
eval "echo rm -f $catdir/$base.$suffix"
|
||||||
|
eval "rm -f $catdir/$base.$suffix"
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
for link in `sed -n -e '/SYNOPSIS/q;/DESCRIPTION/q;s/^\.Nm \([^ ]*\).*/\1/p' $srcdir/$f`; do
|
for link in `sed -n -e '/SYNOPSIS/q;/DESCRIPTION/q;s/^\.Nm \([^ ]*\).*/\1/p' $srcdir/$f`; do
|
||||||
if [ "$link" != "$base" ]; then
|
if [ "$link" == "$base" ]; then
|
||||||
|
continue
|
||||||
|
fi
|
||||||
|
if test "$cmd" = install ; then
|
||||||
target="$mandir/$link.$section"
|
target="$mandir/$link.$section"
|
||||||
for cmd in "ln -f $mandir/$base.$section $target" \
|
for cmd in "ln -f $mandir/$base.$section $target" \
|
||||||
"ln -s $base.$section $target" \
|
"ln -s $base.$section $target" \
|
||||||
@@ -49,6 +58,15 @@ for f in "$@"; do
|
|||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
|
elif test "$cmd" = uninstall ; then
|
||||||
|
target="$mandir/$link.$section"
|
||||||
|
eval "echo rm -f $target"
|
||||||
|
eval "rm -f $target"
|
||||||
|
if test "$catinstall" = yes; then
|
||||||
|
target="$catdir/$link.$suffix"
|
||||||
|
eval "echo rm -f $target"
|
||||||
|
eval "rm -f $target"
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
done
|
done
|
||||||
|
Reference in New Issue
Block a user