diff options
author | Case Duckworth | 2015-04-02 21:27:55 -0700 |
---|---|---|
committer | Case Duckworth | 2015-04-02 21:27:55 -0700 |
commit | d832dace648047cdeee32f295b7f1c799d0b5b50 (patch) | |
tree | 34f7efb6e713eef3522053a8ee2aded46ad1e33d /trunk/common-titles.sh | |
parent | Fix #15: add compile support for indeces (diff) | |
download | autocento-d832dace648047cdeee32f295b7f1c799d0b5b50.tar.gz autocento-d832dace648047cdeee32f295b7f1c799d0b5b50.zip |
Add Islands for backlinkless files
Diffstat (limited to 'trunk/common-titles.sh')
-rw-r--r-- | trunk/common-titles.sh | 7 |
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"; | |||
5 | shift 2; | 5 | shift 2; |
6 | glob="$@"; | 6 | glob="$@"; |
7 | 7 | ||
8 | echo -n "Compiling ${outFile}..."; | 8 | echo -n "Compiling ${outFile}"; |
9 | cat "$header" > $outFile; | 9 | cat "$header" > $outFile; |
10 | 10 | ||
11 | for file in $glob; do | 11 | for 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 "."; | ||
20 | done | 21 | done |
21 | echo "Done."; | 22 | echo "Done."; |