make man page (un)install more portable
authorBjörn Jacke <bj@sernet.de>
Sun, 1 Mar 2009 20:08:33 +0000 (21:08 +0100)
committerVolker Lendecke <vl@samba.org>
Mon, 2 Mar 2009 13:17:06 +0000 (14:17 +0100)
source4/script/installman.sh
source4/script/uninstallman.sh

index ae99bceacf08f9017dc7bc11f68b479d25b1e2c4..a3b6ec0d9372f6348b3066bdf6b9ef54c365060f 100755 (executable)
@@ -6,7 +6,7 @@ MANPAGES=$*
 
 for I in $MANPAGES
 do
-       SECTION=`echo $I | grep -o '.$'`
+       SECTION=`echo -n $I | sed "s/.*\(.\)$/\1/"
        DIR="$MANDIR/man$SECTION"
        if [ ! -d "$DIR" ]
        then
index 72b523ed9e88665c0ab599698128ae7d480fd645..9b087c68bb259ab2166e24a75ab754d9a8d19040 100755 (executable)
@@ -8,7 +8,7 @@ MANPAGES=$*
 
 for I in $MANPAGES
 do
-       SECTION=`echo $I | grep -o '.$'`
+       SECTION=`echo -n $I | sed "s/.*\(.\)$/\1/"
        FNAME=$MANDIR/man$SECTION/$I
        if test -f $FNAME; then
          echo Deleting $FNAME