aboutsummaryrefslogtreecommitdiff
path: root/doc/problemexamples/gen_examples.sh
diff options
context:
space:
mode:
authorcassio <cassiopc@gmail.com>2013-07-02 05:46:45 +0000
committercassio <cassiopc@gmail.com>2013-07-02 05:46:45 +0000
commitbe2491b093b1f0ca430bede679ecbb670041e483 (patch)
treefe2da63d1811cb93e4352a43a113ace37b9f6017 /doc/problemexamples/gen_examples.sh
parenta9aa438ea0558eb0044cf1e54a9190ddb41b65e5 (diff)
downloadboca-be2491b093b1f0ca430bede679ecbb670041e483.tar.gz
boca-be2491b093b1f0ca430bede679ecbb670041e483.zip
restructuring of boca's git
Diffstat (limited to 'doc/problemexamples/gen_examples.sh')
-rwxr-xr-xdoc/problemexamples/gen_examples.sh17
1 files changed, 17 insertions, 0 deletions
diff --git a/doc/problemexamples/gen_examples.sh b/doc/problemexamples/gen_examples.sh
new file mode 100755
index 0000000..6f11671
--- /dev/null
+++ b/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