From 1ad99d5b548aa5e2a4d6aca804ea54658ac977f7 Mon Sep 17 00:00:00 2001 From: Masaya Tojo Date: Tue, 14 Sep 2021 03:52:32 +0900 Subject: check-backup-of-jupyter-notebook: Fix checking method. --- jobs/check-backup-of-jupyter-notebook.run | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'jobs') 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 }' -- cgit v1.2.3