From 9e75d473525446d0961a7567bcb8a1e672949df8 Mon Sep 17 00:00:00 2001 From: cassiopc Date: Sat, 20 Oct 2012 14:24:23 +0200 Subject: fixed team login issue, included empty default options in submission tab, included extra-packages and links in ICPC Linux --- boca-1.5.1/doc/problemexamples/gen_examples.sh | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) mode change 100644 => 100755 boca-1.5.1/doc/problemexamples/gen_examples.sh (limited to 'boca-1.5.1/doc/problemexamples') diff --git a/boca-1.5.1/doc/problemexamples/gen_examples.sh b/boca-1.5.1/doc/problemexamples/gen_examples.sh old mode 100644 new mode 100755 index e25f7e7..6f11671 --- 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 -- cgit v1.2.3