summaryrefslogtreecommitdiffstats
path: root/usr/local/sbin
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@pfsense.org>2005-08-20 02:38:42 +0000
committerScott Ullrich <sullrich@pfsense.org>2005-08-20 02:38:42 +0000
commit36babadc35b220a3d46c38a952ed3df7d99494f0 (patch)
tree2f52aeb290b917c4a270c5842363467e32dbec24 /usr/local/sbin
parent8fa56d1fe08b036c0a2aca9ae2684be173c0de54 (diff)
downloadpfsense-36babadc35b220a3d46c38a952ed3df7d99494f0.zip
pfsense-36babadc35b220a3d46c38a952ed3df7d99494f0.tar.gz
Add databeestje's update_file. The will update file from web_cvs.
IE: update_file.sh /etc/inc/filter.inc
Diffstat (limited to 'usr/local/sbin')
-rwxr-xr-xusr/local/sbin/update_file.sh21
1 files changed, 21 insertions, 0 deletions
diff --git a/usr/local/sbin/update_file.sh b/usr/local/sbin/update_file.sh
new file mode 100755
index 0000000..a665f22
--- /dev/null
+++ b/usr/local/sbin/update_file.sh
@@ -0,0 +1,21 @@
+#!/bin/sh
+
+if [ ! -x `which fetch` ];then
+ echo "no fetch found, I think databeestje lost that part"
+ exit 0
+fi
+
+baseurl='http://pfsense.com/cgi-bin/cvsweb.cgi/pfSense'
+revision='?rev=1;content-type=text%2Fplain'
+
+if [ -z $1 ];then
+ echo "No file to update given"
+ exit 0
+fi
+
+if [ -f $1 ];then
+ #echo running `which fetch` -o "$1" "$baseurl$1$revision"
+ `which fetch` -o "$1" "$baseurl$1$revision"
+else
+ echo "File $1 doesn't exist"
+fi \ No newline at end of file
OpenPOWER on IntegriCloud