summaryrefslogtreecommitdiffstats
path: root/usr/local/sbin
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@pfsense.org>2005-08-23 20:29:28 +0000
committerScott Ullrich <sullrich@pfsense.org>2005-08-23 20:29:28 +0000
commitc3a1c70b558c3c638ebf108f329ad3eb63b16fdb (patch)
tree3965801ef2f4ac91c3edfa4ac457d5e38a540017 /usr/local/sbin
parent3086d0f8c4803778dbb3b0bbc59ba2394371b15a (diff)
downloadpfsense-c3a1c70b558c3c638ebf108f329ad3eb63b16fdb.zip
pfsense-c3a1c70b558c3c638ebf108f329ad3eb63b16fdb.tar.gz
Commit submission from databeestje.
It is now possible to run update_file.sh -a which will update all files in the CVS repo. Well, most of them...
Diffstat (limited to 'usr/local/sbin')
-rwxr-xr-xusr/local/sbin/update_file.sh26
1 files changed, 17 insertions, 9 deletions
diff --git a/usr/local/sbin/update_file.sh b/usr/local/sbin/update_file.sh
index a457515..5e1e51d 100755
--- a/usr/local/sbin/update_file.sh
+++ b/usr/local/sbin/update_file.sh
@@ -12,24 +12,32 @@ rev='1'
if [ -z $1 ];then
echo "No file to update given"
- echo "Usage: $0 /path/to/file [revision]"
+ echo "Usage: `basename $0` /path/to/file [revision]"
+ echo "Usage: `basename $0` -all"
exit 0
fi
-if [ ! -f $1 ];then
+if [ "$1" = "-all" ];then
+ echo "This will update all .php .js and .inc pages on your pfsense box!"
+ FMATCHES=`find /etc/inc/ /usr/local/www /usr/local/captiveportal -name "*.php" -or -name "*.inc" -or -name "*.js"`
+elif [ ! -f $1 ];then
echo "File $1 doesn't exist"
exit 0
-fi
-
-if [ ! -z $2 ];then
- rev=$2
- echo "trying to fetch $rev"
else
- echo "trying to fetch latest"
+ FMATCHES=$1
fi
/etc/rc.conf_mount_rw
-`which fetch` -o "$1" "$baseurl$1$urlrev$rev$urlcon"
+for file in $FMATCHES ;do
+ if [ ! -z $2 ];then
+ rev=$2
+ echo "trying to fetch $rev $file"
+ else
+ echo "trying to fetch latest $file"
+ fi
+ #echo fetch -o "$file" "$baseurl$file$urlrev$rev$urlcon"
+ `which fetch` -o "$file" "$baseurl$file$urlrev$rev$urlcon"
+done
/etc/rc.conf_mount_ro
OpenPOWER on IntegriCloud