diff options
| author | Andi Gutmans <andi@php.net> | 1999-07-15 18:33:41 +0000 |
|---|---|---|
| committer | Andi Gutmans <andi@php.net> | 1999-07-15 18:33:41 +0000 |
| commit | 2a43afd2ced1908de514731eb0cd376d8c59e4c9 (patch) | |
| tree | 0cb00cbd7d1b8568368d5ac02733a30b332e7a38 /scripts/apache/aphtaccess-conv.sh | |
| parent | 5fc8562b5d18c9175ffc86ef42855ad266b4e98f (diff) | |
| download | php-git-2a43afd2ced1908de514731eb0cd376d8c59e4c9.tar.gz | |
Sooner than you think, Sascha :)
Diffstat (limited to 'scripts/apache/aphtaccess-conv.sh')
| -rwxr-xr-x | scripts/apache/aphtaccess-conv.sh | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/scripts/apache/aphtaccess-conv.sh b/scripts/apache/aphtaccess-conv.sh new file mode 100755 index 0000000000..1af59d2843 --- /dev/null +++ b/scripts/apache/aphtaccess-conv.sh @@ -0,0 +1,24 @@ +#!/bin/sh + +if [ "$1" = "" ]; then + echo "Usage: $0 /somewhere/.htaccess" + exit 1 +fi + +if [ ! -w $1 ]; then + echo "You cannot write to $1" + exit 1 +fi + +TMPFILE=tmpfile.$$ + +awk -f htaccessfix.awk <$1 >$TMPFILE + +if [ "$?" != 0 ]; then + exit 1 +fi + +mv -f $1 $1.orig +mv -f $TMPFILE $1 +exit 0 + |
