X-Git-Url: https://iankelling.org/git/?p=buildscripts;a=blobdiff_plain;f=go;h=547a1345d968e48bfec6b2820c97989058247271;hp=d58bca7c87aa463d2b7662ba9ac464476e292cdc;hb=HEAD;hpb=f898fa23c5a5f455bf300fb48e57641e290334fb diff --git a/go b/go index d58bca7..354b92e 100755 --- a/go +++ b/go @@ -51,8 +51,13 @@ install=false if ! $force; then yesterday=$(( $(date +%s) - 60*60*24 )) + fetch_mtime=$(stat -c %Y FETCH_HEAD) + if [[ ! $fetch_mtime ]]; then + err failed to get output from stat -c %Y FETCH_HEAD + exit 1 + fi # no need to check for updates on go more than once a day - if (( $(stat -c %Y FETCH_HEAD) > yesterday )); then + if (( fetch_mtime > yesterday )); then up=false fi