Skip to main content

fix the date check in ‘ds’

ID
a3f0cce
date
2022-10-02 18:03:12+00:00
author
Alex Chan <alex@alexwlchan.net>
parent
c7792f1
message
fix the date check in 'ds'
changed files
1 file, 1 addition, 1 deletion

Changed files

ds (1123) → ds (1112)

diff --git a/ds b/ds
index 464754c..2277499 100755
--- a/ds
+++ b/ds
@@ -19,7 +19,7 @@ set -o errexit
 set -o nounset
 
 LATEST_DOWNLOAD="$(latest_download)"
-MTIME=$(ls -l "$LATEST_DOWNLOAD" | awk '{print $5}')
+MTIME=$(date -r "$LATEST_DOWNLOAD" "+%s")
 NOW=$(date +%s)
 
 # Do a sense check: is this a file I downloaded recently?