]> git.donarmstrong.com Git - bugscan.git/commitdiff
use stat and date properly instead of ls tomfoolery
authorDon Armstrong <don@donarmstrong.com>
Tue, 13 Apr 2010 01:39:00 +0000 (18:39 -0700)
committerDon Armstrong <don@donarmstrong.com>
Tue, 13 Apr 2010 01:39:00 +0000 (18:39 -0700)
dohtml

diff --git a/dohtml b/dohtml
index 316d5ee43eda229908648347759395aa66d0cf8b..3e1e04eeb6d43c3ce0282db44f9ebf67184d99c1 100755 (executable)
--- a/dohtml
+++ b/dohtml
@@ -145,8 +145,8 @@ makepage() {
        mv -f $3.new $3
 }
 
-time=$(date -u --date="$(ls -Ll status | awk '{print $6, $7}'):00 $(date +%z)")
-oldtime=$(date -u --date="$(ls -Ll status-old | awk '{print $6, $7}'):00 $(date +%z)")
+time=$(date -u -d '@'$(($(stat -c '%Y' status) / 3600 * 3600)))
+oldtime=$(date -u -d '@'$(($(stat -c '%Y' status-old) / 3600 * 3600)))
 title="Release-critical bugs status"
 
 makepage "debian" "$title" "$htmldir/debian/all.html" "$time"