diff --git a/sdk/build-github.sh b/sdk/build-github.sh index b9231f601..04b3150ca 100755 --- a/sdk/build-github.sh +++ b/sdk/build-github.sh @@ -57,12 +57,16 @@ copy_images() { else cp -r tmp/deploy/images ${1}/ fi - # Jenkins artifact archiver does not copy symlinks, so remove them - # beforehand to avoid ending up with several duplicates of the same - # files. - if [ -d "${1}/images" ]; then - find ${1}/images -type l -delete - fi + + # Images directory post-processing + # - Jenkins artifact archiver does not copy symlinks, so remove them + # beforehand to avoid ending up with several duplicates of the same + # files. + # - Remove 'README_-_DO_NOT_DELETE_FILES_IN_THIS_DIRECTORY.txt' files + # - Create MD5SUMS file + find ${1} -type l -delete + find ${1} -type f -name 'README_-_DO_NOT_DELETE*' -delete + find ${1} -type f -not -name MD5SUMS -print0 | xargs -r -0 md5sum | sed -e "s,${1}/,,g" | sort -k2,2 > ${1}/MD5SUMS } # diff --git a/sdk/build.sh b/sdk/build.sh index 32f2c74fb..b54e88f3e 100755 --- a/sdk/build.sh +++ b/sdk/build.sh @@ -79,12 +79,16 @@ copy_images() { cp -r tmp/deploy/sdk ${1}/ fi fi - # Jenkins artifact archiver does not copy symlinks, so remove them - # beforehand to avoid ending up with several duplicates of the same - # files. - if [ -d "${1}/images" ]; then - find ${1}/images -type l -delete - fi + + # Images directory post-processing + # - Jenkins artifact archiver does not copy symlinks, so remove them + # beforehand to avoid ending up with several duplicates of the same + # files. + # - Remove 'README_-_DO_NOT_DELETE_FILES_IN_THIS_DIRECTORY.txt' files + # - Create MD5SUMS file + find ${1} -type l -delete + find ${1} -type f -name 'README_-_DO_NOT_DELETE*' -delete + find ${1} -type f -not -name MD5SUMS -print0 | xargs -r -0 md5sum | sed -e "s,${1}/,,g" | sort -k2,2 > ${1}/MD5SUMS } #