diff --git a/src/build.sh b/src/build.sh index 3bf8d7a29bde42050e0d9b62fdc0265f1d46a884..2b9245f07dc827f17daea0d4f67bd81df0779c33 100755 --- a/src/build.sh +++ b/src/build.sh @@ -228,15 +228,22 @@ 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 - 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