summaryrefslogtreecommitdiffstats
path: root/usr/local/sbin
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@pfsense.org>2005-08-20 21:44:07 +0000
committerScott Ullrich <sullrich@pfsense.org>2005-08-20 21:44:07 +0000
commite6e417ab8e6271726b1a358be6316999d2e979e3 (patch)
tree239cf555cd6479d7c6dc44a00d0c6cd072ccef68 /usr/local/sbin
parentfaee6cd640907a350331534e6aaad563e729b4d8 (diff)
downloadpfsense-e6e417ab8e6271726b1a358be6316999d2e979e3.zip
pfsense-e6e417ab8e6271726b1a358be6316999d2e979e3.tar.gz
New version
Submitted-by: databeestje
Diffstat (limited to 'usr/local/sbin')
-rwxr-xr-xusr/local/sbin/update_file.sh22
1 files changed, 16 insertions, 6 deletions
diff --git a/usr/local/sbin/update_file.sh b/usr/local/sbin/update_file.sh
index a665f22..61753f0 100755
--- a/usr/local/sbin/update_file.sh
+++ b/usr/local/sbin/update_file.sh
@@ -6,16 +6,26 @@ if [ ! -x `which fetch` ];then
fi
baseurl='http://pfsense.com/cgi-bin/cvsweb.cgi/pfSense'
-revision='?rev=1;content-type=text%2Fplain'
+urlrev='?rev='
+urlcon=';content-type=text%2Fplain'
+rev='1'
if [ -z $1 ];then
echo "No file to update given"
+ echo "Usage: $0 /path/to/file [revision]"
exit 0
fi
-if [ -f $1 ];then
- #echo running `which fetch` -o "$1" "$baseurl$1$revision"
- `which fetch` -o "$1" "$baseurl$1$revision"
-else
+if [ ! -f $1 ];then
echo "File $1 doesn't exist"
-fi \ No newline at end of file
+ exit 0
+fi
+
+if [ ! -z $2 ];then
+ rev=$2
+ echo "trying to fetch $rev"
+else
+ echo "trying to fetch latest"
+fi
+
+`which fetch` -o "$1" "$baseurl$1$urlrev$rev$urlcon" \ No newline at end of file
OpenPOWER on IntegriCloud