diff options
Diffstat (limited to 'usr/local/sbin')
-rwxr-xr-x | usr/local/sbin/update_file.sh | 21 |
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 |