From 51282f87a947d90d88054fe24c19443c7789e449 Mon Sep 17 00:00:00 2001 From: Romain Hunault Date: Wed, 16 Dec 2020 15:55:14 +0100 Subject: [PATCH 1/3] Create a sha256sum for recovery image --- src/build.sh | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/src/build.sh b/src/build.sh index 3bf8d7a..310afe2 100755 --- a/src/build.sh +++ b/src/build.sh @@ -230,13 +230,19 @@ if [ -n "${BRANCH_NAME}" ] && [ -n "${DEVICE}" ]; then md5sum "IMG-$build" > "IMG-$build.md5sum" fi - if [ "$RECOVERY_IMG" = true ]; then - if [ -f "recovery.img" ]; then - cp -a recovery.img "$ZIP_DIR/$zipsubdir/recovery-${build%.*}.img" - else - cp -a boot.img "$ZIP_DIR/$zipsubdir/recovery-${build%.*}.img" - fi - fi + if [ "$RECOVERY_IMG" = true ]; then + + RECOVERY_IMG_NAME="recovery-${build%.*}.img" + + if [ -f "recovery.img" ]; then + cp -a recovery.img "$RECOVERY_IMG_NAME" + else + cp -a boot.img "$RECOVERY_IMG_NAME" + fi + + sha256sum "$RECOVERY_IMG_NAME" > "$RECOVERY_IMG_NAME.sha256sum" + mv "$RECOVERY_IMG_NAME*" "$ZIP_DIR/$zipsubdir/" + fi done cd "$source_dir" || return 1 -- GitLab From 2bcef2f18835abdf535f0d87b9b3257c8f82670b Mon Sep 17 00:00:00 2001 From: Alexandre Roux Date: Wed, 16 Dec 2020 15:53:11 +0000 Subject: [PATCH 2/3] go back to build directory after saving intermediate system img --- src/build.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/src/build.sh b/src/build.sh index 310afe2..84246b2 100755 --- a/src/build.sh +++ b/src/build.sh @@ -228,6 +228,7 @@ if [ -n "${BRANCH_NAME}" ] && [ -n "${DEVICE}" ]; then cd $ZIP_DIR/$zipsubdir sha256sum "IMG-$build" > "IMG-$build.sha256sum" md5sum "IMG-$build" > "IMG-$build.md5sum" + cd "$source_dir/out/target/product/${DEVICE}" || return 1 fi if [ "$RECOVERY_IMG" = true ]; then -- GitLab From 075355dff3a9e28084815cc304a2cefcda42b8df Mon Sep 17 00:00:00 2001 From: Alexandre Roux Date: Thu, 17 Dec 2020 16:17:12 +0000 Subject: [PATCH 3/3] * should be outside of "" --- src/build.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/build.sh b/src/build.sh index 84246b2..2b9245f 100755 --- a/src/build.sh +++ b/src/build.sh @@ -242,7 +242,7 @@ if [ -n "${BRANCH_NAME}" ] && [ -n "${DEVICE}" ]; then fi sha256sum "$RECOVERY_IMG_NAME" > "$RECOVERY_IMG_NAME.sha256sum" - mv "$RECOVERY_IMG_NAME*" "$ZIP_DIR/$zipsubdir/" + mv "$RECOVERY_IMG_NAME"* "$ZIP_DIR/$zipsubdir/" fi done -- GitLab