You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
- #!/bin/sh
-
- set -e
-
- if [ ! -x ./main ]; then
- make main
- fi
-
- if [ "$1" = "" ]; then
- echo "Usage: $0 <directory>"
- exit 1
- fi
-
- if [ ! -d "$1" ]; then
- echo "$0: $1 is not a directory"
- exit 1
- fi
-
- find $1 -type f | while read i; do
- OUTPUT="$(echo "$i" | tr -d / | sed 's/^[.]*//')-serp.txt"
- echo "$0: outputting to $OUTPUT"
-
- if [ -f "$OUTPUT" ]; then
- echo "$0: file already exists, skipping"
- continue
- fi
-
- touch "$OUTPUT"
- ./main -7 "$i" | tee -a "$OUTPUT" | while read line; do
- echo -n .
- done
- echo "done."
- done
|