blob: df6158d6a19646983b871c94ef4173de8a38ea01 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
#!/bin/bash
outFile="$1";
header="$2";
shift 2;
glob="$@";
echo -n "Compiling ${outFile}";
cat "$header" > $outFile;
for file in $glob; do
# Copy title to $outFile & link
title="$(grep '^title:' "$file" | cut -d' ' -f2- | sed 's/"//g')";
if (( $RANDOM % 13 == 0 )); then
echo -n "| " >> "$outFile";
else
echo -n " " >> "$outFile";
fi
echo "[$title](${file%.*}.html)" >> "$outFile";
echo -n ".";
done
echo "Done.";
|