overdue commit lots of changes
[buildscripts] / go
diff --git a/go b/go
index d58bca7c87aa463d2b7662ba9ac464476e292cdc..354b92e3ae3ecc8c0edb7554236362926cf837ee 100755 (executable)
--- 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