From: Don Armstrong Date: Tue, 13 Apr 2010 01:39:00 +0000 (-0700) Subject: use stat and date properly instead of ls tomfoolery X-Git-Url: https://git.donarmstrong.com/?p=bugscan.git;a=commitdiff_plain;h=e993c9f56488aa3356bf8b9c794dbcc5bc0f511d;ds=sidebyside use stat and date properly instead of ls tomfoolery --- diff --git a/dohtml b/dohtml index 316d5ee..3e1e04e 100755 --- 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"