diff --git a/src/blog-make b/src/blog-make index ad5b83f..a0ceb95 100755 --- a/src/blog-make +++ b/src/blog-make @@ -23,7 +23,7 @@ echo > cache/dirtytags dirty=0 # open database -sqlite3 cache/posts.db "create table if not exists posts ( title TEXT, prefix TEXT, date TEXT, modified TEXT, tag TEXT)" +sqlite3 cache/posts.db "create table if not exists posts ( title TEXT, prefix TEXT, date TEXT, modified TEXT, tag TEXT);" makerssfeed () { rssfilename=feed.xml @@ -79,7 +79,7 @@ gettimestamp () { timestamp=`try stat -f "%Sm" -t "%Y%m%d%H%M%S" $file` ;; esac - print $timestamp + printf "$timestamp" } isnewer () { @@ -117,30 +117,30 @@ processheader () { if [ "$modified" = "" ]; then modified=$date fi - sqlite3 cache/posts.db "delete from posts where prefix = \"$fileprefix\"" + sqlite3 cache/posts.db "delete from posts where prefix = \"$fileprefix\";" tags=`sed -n 's/^tags: *//p' $header` if [ "$tags" = "" ]; then - sqlite3 cache/posts.db "insert into posts values (\"$title\",\"$fileprefix\",\"$date\",\"$modified\",\"\")" + sqlite3 cache/posts.db "insert into posts values (\"$title\",\"$fileprefix\",\"$date\",\"$modified\",\"\");" else for tag in $tags; do - sqlite3 cache/posts.db "insert into posts values (\"$title\",\"$fileprefix\",\"$date\",\"$modified\",\"$tag\")" + sqlite3 cache/posts.db "insert into posts values (\"$title\",\"$fileprefix\",\"$date\",\"$modified\",\"$tag\");" done fi } htmlhead () { prefix=$1 - title=`sqlite3 cache/posts.db "select distinct title from posts where prefix = \"$prefix\""` + title=`sqlite3 cache/posts.db "select distinct title from posts where prefix = \"$prefix\";"` echo "