diff options
Diffstat (limited to 'tools/etc/icpc/update.sh')
| -rwxr-xr-x | tools/etc/icpc/update.sh | 8 |
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 $? |