From be2491b093b1f0ca430bede679ecbb670041e483 Mon Sep 17 00:00:00 2001 From: cassio Date: Tue, 2 Jul 2013 09:46:45 +0400 Subject: restructuring of boca's git --- doc/problemexamples/gen_examples.sh | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100755 doc/problemexamples/gen_examples.sh (limited to 'doc/problemexamples/gen_examples.sh') 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 -- cgit v1.2.3