From d33e33fc6e8bf6eada685dffc25ab8d22e456fff Mon Sep 17 00:00:00 2001 From: Drew Short Date: Wed, 22 Jan 2020 21:19:38 -0600 Subject: [PATCH] Fix SHA256 generation --- assets/out | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/assets/out b/assets/out index ce13d94..f968314 100644 --- a/assets/out +++ b/assets/out @@ -50,8 +50,10 @@ local_source_dir="${source}/${rclone_source_directory}" ls -alh "${local_source_dir}" echo "Generating SHA256" -(find "${local_source_dir}" -type f -exec sha256sum {} \;) | cut -d ' ' -f1 | xargs echo /tmp/rclone_source.sha256 -sha256=$(sha256sum /tmp/rclone_source.sha256 | cut -d' ' -f1) +sha256_file="${TMPDIR}/rclone_source.sha256" +touch "${sha256_file}" +(find "${local_source_dir}" -type f -exec sha256sum {} \;) | cut -d ' ' -f1 | xargs echo >> "${sha256_file}" +sha256=$(sha256sum "${sha256_file}" | cut -d' ' -f1) echo "sha256:${sha256}" # Source is always the same for each destination