about summary refs log tree commit diff stats
path: root/trunk/backlink.sh
diff options
context:
space:
mode:
Diffstat (limited to 'trunk/backlink.sh')
-rw-r--r--trunk/backlink.sh4
1 files changed, 3 insertions, 1 deletions
diff --git a/trunk/backlink.sh b/trunk/backlink.sh index 15bb11e..c9740d9 100644 --- a/trunk/backlink.sh +++ b/trunk/backlink.sh
@@ -20,10 +20,12 @@ if ! grep -ql "$searchQuery" $glob >> "$outFile"; then
20 echo "- [$title]($searchQuery)" >> "${islandLink}.txt" 20 echo "- [$title]($searchQuery)" >> "${islandLink}.txt"
21fi 21fi
22 22
23# Change title of $outFile 23# Change title & id of $outFile
24inText="`basename $searchQuery .html`.txt"; 24inText="`basename $searchQuery .html`.txt";
25title=`grep '^title:' "$inText" | cut -d' ' -f2-`; 25title=`grep '^title:' "$inText" | cut -d' ' -f2-`;
26id=`grep '^id:' "${searchQuery%.html}.txt" | cut -d' ' -f2`;
26sed -i "s/_TITLE_/$title/" "$outFile"; 27sed -i "s/_TITLE_/$title/" "$outFile";
28sed -i "s/_ID_/$id/" "$outFile";
27echo -n "." 29echo -n "."
28 30
29# Change *.txt to *.html 31# Change *.txt to *.html