diff options
author | Robin H. Johnson <robbat2@gentoo.org> | 2019-12-21 12:59:56 -0800 |
---|---|---|
committer | Robin H. Johnson <robbat2@gentoo.org> | 2019-12-21 12:59:56 -0800 |
commit | 7dab78c95d872168fc9da33fc502a86c4cb3959b (patch) | |
tree | bba61fdf7730097a4f97f357b8d959447045369f | |
parent | snapshots-create.sh: shellcheck cleanups (diff) | |
download | mastermirror-scripts-7dab78c95d872168fc9da33fc502a86c4cb3959b.tar.gz mastermirror-scripts-7dab78c95d872168fc9da33fc502a86c4cb3959b.tar.bz2 mastermirror-scripts-7dab78c95d872168fc9da33fc502a86c4cb3959b.zip |
snapshots-create.sh: minor readability improvement20191221T130302Z
Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
-rwxr-xr-x | snapshots-create.sh | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/snapshots-create.sh b/snapshots-create.sh index cf2948a..c54c5a9 100755 --- a/snapshots-create.sh +++ b/snapshots-create.sh @@ -174,7 +174,9 @@ fi rm -f "${EXCLUSION_LIST}" # Not needed after this write_time_log "END TARBALL(tar,old) $(date -u)" write_time_log "START TARBALL(umd5,old) $(date -u)" -[ ! -f " ${FILENAME}.umd5sum" ] && md5sum ${FILENAME%.bz2} | tee ${FILENAME%.bz2}.bz2.umd5sum ${FILENAME%.bz2}.xz.umd5sum >/dev/null +if [ ! -f " ${FILENAME}.umd5sum" ]; then + md5sum ${FILENAME%.bz2} | tee ${FILENAME%.bz2}.bz2.umd5sum ${FILENAME%.bz2}.xz.umd5sum >/dev/null +fi write_time_log "END TARBALL(umd5,old) $(date -u)" # end 1b) @@ -221,7 +223,9 @@ if [ ! -f "${FILENAME_NEW%.xz}" ]; then fi write_time_log "END TARBALL(transform,new) $(date -u)" write_time_log "START TARBALL(umd5,new) $(date -u)" -[ ! -f "${FILENAME_NEW}.umd5sum" ] && md5sum ${FILENAME_NEW%.xz} > ${FILENAME_NEW}.umd5sum +if [ ! -f " ${FILENAME_NEW}.umd5sum" ]; then + md5sum ${FILENAME_NEW%.xz} > ${FILENAME_NEW}.umd5sum +fi write_time_log "END TARBALL(umd5,new) $(date -u)" # end 1c) |