about summary refs log tree commit diff stats
path: root/trunk/backlink.sh
diff options
context:
space:
mode:
authorCase Duckworth2015-04-03 13:53:31 -0700
committerCase Duckworth2015-04-03 13:53:31 -0700
commit973ff0813f67af319868ba465e6817dc4cbc730b (patch)
treef3f285651cb5659a90aec87c25886f66f3f90517 /trunk/backlink.sh
parentUpdate make clean (diff)
downloadautocento-973ff0813f67af319868ba465e6817dc4cbc730b.tar.gz
autocento-973ff0813f67af319868ba465e6817dc4cbc730b.zip
Add backlinks to backlinks
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