aboutsummaryrefslogtreecommitdiff
path: root/jobs
diff options
context:
space:
mode:
authorMasaya Tojo <masaya@tojo.tokyo>2021-09-14 00:28:03 +0900
committerMasaya Tojo <masaya@tojo.tokyo>2021-09-14 00:28:03 +0900
commita4a05ead2f0178ded2e97be33443e65089aa74fe (patch)
treeee753e62f0139f0babd2a18af15d35cd3565392d /jobs
parenta73ad8b9e36026ec1c3fa3b4e848f77fc0f7b6f0 (diff)
check-notebooks-backup: Display message when failed.
Diffstat (limited to 'jobs')
-rwxr-xr-xjobs/check-notebooks-backup.run3
1 files changed, 2 insertions, 1 deletions
diff --git a/jobs/check-notebooks-backup.run b/jobs/check-notebooks-backup.run
index 190db3e..ad52001 100755
--- a/jobs/check-notebooks-backup.run
+++ b/jobs/check-notebooks-backup.run
@@ -4,6 +4,7 @@ set -euo pipefail
todays_backup="s3://qkbackup/notebooks/$(date "+%Y/%m/%d")"
echo "Check $todays_backup."
output="$(guix environment --ad-hoc python2-s3cmd -- s3cmd ls "$todays_backup")"
+echo "$output"
# 容量が 1000 以下の場合はバックアップに失敗したと見做す
-echo "$output" | awk '!$3 || $3 <= 1000 { exit 1 }'
+echo "$output" | awk '!$3 || $3 <= 1000 { print "Failed!"; exit 1 }'