(|l)gpl-2.[01].tex: Remove the `\renewcommand{\theenumi}...' comments.
[cfd] / maninst
diff --git a/maninst b/maninst
index 8ef9dc0..20fbf6c 100755 (executable)
--- a/maninst
+++ b/maninst
@@ -24,8 +24,7 @@ case $op in
   *) echo >&2 "$0: unknown operation \`$1'"; exit 1 ;;
 esac
 for i; do
-  base=`echo "$i" | sed 's:^.*/::'`
-  sec=`echo "$base" | sed 's:^.*\.::'`
+  base=${i##*/} sec=${base##*.}
   case $op in
     install)
       echo -n " Installing manpage $base$ext"
@@ -39,12 +38,14 @@ for i; do
   for l in `sed 's:^\.\\\"  *@::p; d' "$srcdir/$i"`; do
     case $op in
       install)
-        echo -n "."
-       echo ".so man$sec/$base$ext" >"$mandir/man$sec/$l.$sec$ext"
-       chmod $mode "$mandir/man$sec/$l.$sec$ext"
+       if [ "$l.$sec" != "$base" ]; then
+         echo -n "."
+         echo ".so man$sec/$base$ext" >"$mandir/man$sec/$l.$sec$ext"
+         chmod $mode "$mandir/man$sec/$l.$sec$ext"
+       fi
        ;;
       uninstall)
-        rm -f "$mandir/man$sec/$l.$sec$ext"
+       rm -f "$mandir/man$sec/$l.$sec$ext"
        ;;
     esac
   done