From 5cfc100c4679cc58b59c9b3b0df33adca7a0292b Mon Sep 17 00:00:00 2001 From: Vincent Riquer Date: Sun, 6 Oct 2013 02:46:11 +0200 Subject: [PATCH] Show off --- toys/createindex | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/toys/createindex b/toys/createindex index 9eec4c4..a7274d5 100755 --- a/toys/createindex +++ b/toys/createindex @@ -43,6 +43,7 @@ do source "$function" done +args="$@" while [ -n "$1" ] do opt="$1" @@ -194,11 +195,27 @@ then updateTags fi +echo 'SELECT IFNULL( + (SELECT last_seen FROM source_files ORDER BY last_seen DESC LIMIT 1), + 0);' >&3 +read -u4 lastupdate + if ! [[ "$output" == - ]] then exec > "$output" fi +cat <<-EOBrag + # Generated by AtOM's createindex toy. + # https://gitorious.org/atom + # (C) 2012-2013 Vincent Riquer (GPL-3) + # + # $0 $args + # + # Last database update: $(date -d @$lastupdate +'%x %X') + +EOBrag + printDate() { date -d"@$1" +"${timeformat:-%x %X}" }