about summary refs log tree commit diff stats
path: root/trunk/common-titles.sh
diff options
context:
space:
mode:
Diffstat (limited to 'trunk/common-titles.sh')
-rw-r--r--trunk/common-titles.sh7
1 files changed, 4 insertions, 3 deletions
diff --git a/trunk/common-titles.sh b/trunk/common-titles.sh index 9bc0de8..df6158d 100644 --- a/trunk/common-titles.sh +++ b/trunk/common-titles.sh
@@ -5,17 +5,18 @@ header="$2";
5shift 2; 5shift 2;
6glob="$@"; 6glob="$@";
7 7
8echo -n "Compiling ${outFile}..."; 8echo -n "Compiling ${outFile}";
9cat "$header" > $outFile; 9cat "$header" > $outFile;
10 10
11for file in $glob; do 11for file in $glob; do
12 # Copy title to $outFile & link 12 # Copy title to $outFile & link
13 title="$(grep '^title:' "$file" | cut -d' ' -f2- | sed 's/"//g')"; 13 title="$(grep '^title:' "$file" | cut -d' ' -f2- | sed 's/"//g')";
14 if (( $RANDOM % 13 == 0 )); then 14 if (( $RANDOM % 13 == 0 )); then
15 echo -n "| "; 15 echo -n "| " >> "$outFile";
16 else 16 else
17 echo -n " "; 17 echo -n " " >> "$outFile";
18 fi 18 fi
19 echo "[$title](${file%.*}.html)" >> "$outFile"; 19 echo "[$title](${file%.*}.html)" >> "$outFile";
20 echo -n ".";
20done 21done
21echo "Done."; 22echo "Done.";