aboutsummaryrefslogtreecommitdiff
path: root/boca-1.5.1/doc/problemexamples
diff options
context:
space:
mode:
authorcassiopc <cassiopc@gmail.com>2012-10-20 12:24:23 +0000
committercassiopc <cassiopc@gmail.com>2012-10-20 12:24:23 +0000
commit9e75d473525446d0961a7567bcb8a1e672949df8 (patch)
treea054cab8f262a6e9230bc572ecae25513572c99b /boca-1.5.1/doc/problemexamples
parente457938928ba589b16f12a2e6d38922dd94b2a51 (diff)
downloadboca-9e75d473525446d0961a7567bcb8a1e672949df8.tar.gz
boca-9e75d473525446d0961a7567bcb8a1e672949df8.zip
fixed team login issue, included empty default options in submission tab, included extra-packages and links in ICPC Linux
Diffstat (limited to 'boca-1.5.1/doc/problemexamples')
-rwxr-xr-x[-rw-r--r--]boca-1.5.1/doc/problemexamples/gen_examples.sh21
1 files changed, 16 insertions, 5 deletions
diff --git a/boca-1.5.1/doc/problemexamples/gen_examples.sh b/boca-1.5.1/doc/problemexamples/gen_examples.sh
index e25f7e7..6f11671 100644..100755
--- a/boca-1.5.1/doc/problemexamples/gen_examples.sh
+++ b/boca-1.5.1/doc/problemexamples/gen_examples.sh
@@ -1,6 +1,17 @@
#!/bin/bash
-rm -f keys.txt
-../../src/private/createproblemzip.php abacaxi A.problem.zip password | grep -A2 "The following line" | tail -n1 >> keys.txt
-../../src/private/createproblemzip.php bits B.problem.zip password | grep -A2 "The following line" | tail -n1 >> keys.txt
-../../src/private/createproblemzip.php formiga C.problem.zip password | grep -A2 "The following line" | tail -n1 >> keys.txt
-../../src/private/createproblemzip.php multas D.problem.zip password | grep -A2 "The following line" | tail -n1 >> keys.txt
+if [ "$1" == "" ]; then
+ echo "CREATING FILES WITHOUT PASSWORDS"
+ for i in `ls`; do
+ if [ -d $i ]; then
+ cd $i; zip -r ../$i.zip .; cd -;
+ fi
+ done
+else
+ echo "USING ARGUMENT AS PASSWORD"
+ rm -f keys.txt
+ for i in `ls`; do
+ if [ -d $i ]; then
+ ../../src/private/createproblemzip.php "$i" "$i.zip" "$1" | grep -A2 "The following line" | tail -n1 >> keys.txt
+ fi
+ done
+fi