aboutsummaryrefslogtreecommitdiff
path: root/boca-1.5.2/doc/problemexamples/gen_examples.sh
diff options
context:
space:
mode:
authorcassiopc <cassiopc@gmail.com>2012-10-24 07:56:07 +0000
committercassiopc <cassiopc@gmail.com>2012-10-24 07:56:07 +0000
commit3a5f406ff59a05c0eddda191127d58b39cb8049b (patch)
treef3ff6adfea30fba8271dedc81d7d652737ae397e /boca-1.5.2/doc/problemexamples/gen_examples.sh
parent9ae5ead9f89bcc7195420bdf6cc78db2c63dbeda (diff)
downloadboca-3a5f406ff59a05c0eddda191127d58b39cb8049b.tar.gz
boca-3a5f406ff59a05c0eddda191127d58b39cb8049b.zip
open dir for 1.5.2. I still must split devel and master in different branches to properly use git...
Diffstat (limited to 'boca-1.5.2/doc/problemexamples/gen_examples.sh')
-rwxr-xr-xboca-1.5.2/doc/problemexamples/gen_examples.sh17
1 files changed, 17 insertions, 0 deletions
diff --git a/boca-1.5.2/doc/problemexamples/gen_examples.sh b/boca-1.5.2/doc/problemexamples/gen_examples.sh
new file mode 100755
index 0000000..6f11671
--- /dev/null
+++ b/boca-1.5.2/doc/problemexamples/gen_examples.sh
@@ -0,0 +1,17 @@
+#!/bin/bash
+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