diff options
| author | cassiopc <cassiopc@gmail.com> | 2012-10-23 16:06:29 +0000 |
|---|---|---|
| committer | cassiopc <cassiopc@gmail.com> | 2012-10-23 16:06:29 +0000 |
| commit | ae66d208b185a163091444bc45cafbfc84217fde (patch) | |
| tree | 44f5d16ea5fffdc0622e696c99887c0e7407a2d5 | |
| parent | f4b694b6029d4143eabfa18743233899e40687fc (diff) | |
| download | boca-ae66d208b185a163091444bc45cafbfc84217fde.tar.gz boca-ae66d208b185a163091444bc45cafbfc84217fde.zip | |
improve some ifs in the updatescore.sh
| -rw-r--r-- | boca-1.5.1/tools/icpc.etc.tgz | bin | 9553 -> 9553 bytes | |||
| -rwxr-xr-x | 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 Binary files differindex 6a4f09f..1db13ba 100644 --- a/boca-1.5.1/tools/icpc.etc.tgz +++ b/boca-1.5.1/tools/icpc.etc.tgz 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" |