diff options
Diffstat (limited to 'doc/problemexamples/gen_examples.sh')
| -rwxr-xr-x | doc/problemexamples/gen_examples.sh | 17 |
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 |