From ae66d208b185a163091444bc45cafbfc84217fde Mon Sep 17 00:00:00 2001 From: cassiopc Date: Tue, 23 Oct 2012 18:06:29 +0200 Subject: improve some ifs in the updatescore.sh --- boca-1.5.1/tools/icpc.etc.tgz | Bin 9553 -> 9553 bytes boca-1.5.1/tools/updatescore.sh | 6 +++--- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/boca-1.5.1/tools/icpc.etc.tgz b/boca-1.5.1/tools/icpc.etc.tgz index 6a4f09f..1db13ba 100644 Binary files a/boca-1.5.1/tools/icpc.etc.tgz and b/boca-1.5.1/tools/icpc.etc.tgz differ diff --git a/boca-1.5.1/tools/updatescore.sh b/boca-1.5.1/tools/updatescore.sh index d8cf8e0..bb2d954 100755 --- a/boca-1.5.1/tools/updatescore.sh +++ b/boca-1.5.1/tools/updatescore.sh @@ -104,13 +104,13 @@ while /bin/true; do echo -n "sending password..." wget -t3 -T3 "$BOCASERVER/index.php?name=${user}&password=${res}" --load-cookies $tempdir/.cookie.txt --keep-session-cookies --save-cookies $tempdir/.cookie.txt -O $tempdir/.temp.txt 2>/dev/null >/dev/null grep -qi incorrect $tempdir/.temp.txt - if [ $? != 0 ]; then + if [ "$?" != "0" ]; then rm -f $tempdir/* echo "downloading scoretable..." wget -t3 -T3 "$BOCASERVER/scoretable.php?remote=-42" --load-cookies $tempdir/.cookie.txt --keep-session-cookies --save-cookies $tempdir/.cookie.txt -O $tempdir/score.zip 2>$tempdir/.bocascore.tmp >$tempdir/.bocascore.tmp - if [ $? == 0 ]; then + if [ "$?" == "0" ]; then unzip -qq $tempdir/score.zip - if [ $? == 0 ]; then + if [ "$?" == "0" ]; then for fscore in `ls $tempdir/*.dat`; do chown $apacheuser.root "$tempdir/$fscore" chmod 660 "$tempdir/$fscore" -- cgit v1.2.3