From bc87f6d7e2d10612db0b997e41501c93ede54427 Mon Sep 17 00:00:00 2001 From: William Floyd Date: Sun, 5 Jul 2020 00:21:32 -0400 Subject: [PATCH] image_build: Fix. I don't know how this even worked before, it really should not have. --- src/images_build.sh | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/src/images_build.sh b/src/images_build.sh index dcd1c9c..967d44d 100755 --- a/src/images_build.sh +++ b/src/images_build.sh @@ -354,6 +354,7 @@ __process_scripts() { export FILE_HASH="$( { md5sum "${__source_file}" + "${__source_file}" -d "${__source_file}" -d | sort | while read -r __file; do md5sum "${__file}" done @@ -402,22 +403,24 @@ __get_hash_file() { __check_file() { - __hash_file="$(__get_hash_file "${1}")" + __source="${1}" shift + __hash_file="$(__get_hash_file "${__source}")" + __targets='' if [ "${#}" == '0' ]; then - __targets="$(sed 's|^\./src/|./|' <<<"${1}")" + __targets="$(sed 's|^\./src/|./|' <<<"${__source}")" else until [ "${#}" == '0' ]; do - __targets="${__target} -${1}" + __targets="${1} +${__targets}" shift @@ -431,7 +434,7 @@ ${1}" return 1 fi - done + done < <(sed '/^$/d' <<< "${__targets}") if [ -e "${__hash_file}" ]; then __file_hash="$(cat "${__hash_file}")"