diff options
-rwxr-xr-x | jobs/check-backup-of-jupyter-notebook.run | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/jobs/check-backup-of-jupyter-notebook.run b/jobs/check-backup-of-jupyter-notebook.run index 8cdc4a0..77eb8fe 100755 --- a/jobs/check-backup-of-jupyter-notebook.run +++ b/jobs/check-backup-of-jupyter-notebook.run @@ -6,5 +6,7 @@ echo "Check $todays_backup." output="$(guix environment --ad-hoc python2-s3cmd -- s3cmd ls "$todays_backup")" echo "$output" -# 出力がない、もしくは容量が 1000 以下の場合はバックアップに失敗したと見做す -echo "$output" | awk '!$3 || $3 <= 1000 { print "Failed!"; exit 1 }' +# UTC の時刻で日付が同日の場合はバックアップに成功していると見做す +echo "$output" |\ + awk -v utc_today="$(TZ=UTC date "+%F")" \ + '$1 != utc_today { print "Failed!"; exit 1 }' |