Annotation of embedaddon/php/scripts/apache/aphtaccess-conv.sh, revision 1.1.1.1

1.1       misho       1: #!/bin/sh
                      2: 
                      3: if [ "$1" = "" ]; then
                      4:        echo "Usage: $0 /somewhere/.htaccess"
                      5:        exit 1
                      6: fi
                      7: 
                      8: if [ ! -w $1 ]; then
                      9:        echo "You cannot write to $1"
                     10:        exit 1
                     11: fi
                     12: 
                     13: TMPFILE=tmpfile.$$
                     14: 
                     15: awk -f htaccessfix.awk <$1 >$TMPFILE
                     16: 
                     17: if [ "$?" != 0 ]; then
                     18:        exit 1
                     19: fi
                     20: 
                     21: mv -f $1 $1.orig
                     22: mv -f $TMPFILE $1
                     23: exit 0
                     24: 

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>