aboutsummaryrefslogtreecommitdiff
path: root/tools/etc/icpc/update.sh
diff options
context:
space:
mode:
authorcassio <cassiopc@gmail.com>2015-08-28 09:31:34 +0000
committercassio <cassiopc@gmail.com>2015-08-28 09:31:34 +0000
commit56b10a617339563cda2c761e77b3acb96a1b084c (patch)
treeb0856564f7652ec2940aa6f0595cef1c7b73b52a /tools/etc/icpc/update.sh
parent2a185532e3a0acf9e37e601fc71c148510dd36a7 (diff)
downloadboca-56b10a617339563cda2c761e77b3acb96a1b084c.tar.gz
boca-56b10a617339563cda2c761e77b3acb96a1b084c.zip
small bug fixes
Diffstat (limited to 'tools/etc/icpc/update.sh')
-rwxr-xr-xtools/etc/icpc/update.sh8
1 files changed, 7 insertions, 1 deletions
diff --git a/tools/etc/icpc/update.sh b/tools/etc/icpc/update.sh
index f6b4bb6..78a87bb 100755
--- a/tools/etc/icpc/update.sh
+++ b/tools/etc/icpc/update.sh
@@ -2,7 +2,12 @@
if [ "`id -u`" != "0" ]; then
echo "Script must run as root"
fi
-wget -O /tmp/update.sh "http://www.ime.usp.br/~cassio/boca/update.sh"
+if [ "$1" == "" ]; then
+ wget -O /tmp/update.sh "http://www.ime.usp.br/~cassio/boca/download.php?filename=update.sh"
+else
+ wget -O /tmp/update.sh "http://www.ime.usp.br/~cassio/boca/download.php?filename=update.$1.sh"
+fi
+chmod 700 /tmp/update.sh 2>/dev/null
if [ $? != 0 ]; then
echo "ERROR DOWNLOADING UPDATE"
exit 1
@@ -11,4 +16,5 @@ echo ">>>>>>>>>>"
echo ">>>>>>>>>> Running update script"
echo ">>>>>>>>>>"
/tmp/update.sh
+rm -f /tmp/update.sh
exit $?