From 9994180800fc145bcf1f699ec8b1e5891c31ab42 Mon Sep 17 00:00:00 2001 From: ant Date: Sat, 2 Nov 2024 20:33:15 +0100 Subject: [PATCH] chore(dtb): use 'basename' to remove '.dtb' file extension --- extract_and_push.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/extract_and_push.sh b/extract_and_push.sh index 4702df8..e29610d 100755 --- a/extract_and_push.sh +++ b/extract_and_push.sh @@ -387,7 +387,7 @@ if [[ -f "${PWD}/boot.img" ]]; then echo "[INFO] Decompiling device-tree blobs..." # Decompile '.dtb' to '.dts' for dtb in $(find "${PWD}/boot/dtb" -type f); do - dtc -q -I dtb -O dts "${dtb}" >> "${OUTPUT}/dts/$(basename "${dtb}" | sed 's/\.dtb/.dts/')" || echo "[ERROR] Failed to decompile." + dtc -q -I dtb -O dts "${dtb}" >> "${OUTPUT}/dts/$(basename "${dtb}" .dtb).dts" || echo "[ERROR] Failed to decompile." done fi fi @@ -431,7 +431,7 @@ if [[ -f "${PWD}/vendor_boot.img" ]]; then echo "[INFO] Decompiling device-tree blobs..." # Decompile '.dtb' to '.dts' for dtb in $(find "${OUTPUT}/dtb" -type f); do - dtc -q -I dtb -O dts "${dtb}" >> "${OUTPUT}/dts/$(basename "${dtb}" | sed 's/\.dtb/.dts/')" || echo "[ERROR] Failed to decompile." + dtc -q -I dtb -O dts "${dtb}" >> "${OUTPUT}/dts/$(basename "${dtb}" .dtb).dts" || echo "[ERROR] Failed to decompile." done fi fi @@ -475,7 +475,7 @@ if [[ -f "${PWD}/vendor_kernel_boot.img" ]]; then echo "[INFO] Decompiling device-tree blobs..." # Decompile '.dtb' to '.dts' for dtb in $(find "${OUTPUT}/dtb" -type f); do - dtc -q -I dtb -O dts "${dtb}" >> "${OUTPUT}/dts/$(basename "${dtb}" | sed 's/\.dtb/.dts/')" || echo "[ERROR] Failed to decompile." + dtc -q -I dtb -O dts "${dtb}" >> "${OUTPUT}/dts/$(basename "${dtb}" .dtb).dts" || echo "[ERROR] Failed to decompile." done fi fi @@ -525,7 +525,7 @@ if [[ -f "${PWD}/dtbo.img" ]]; then # Decompile '.dtb' to '.dts' echo "[INFO] Decompiling device-tree blobs..." for dtb in $(find "${OUTPUT}" -type f); do - dtc -q -I dtb -O dts "${dtb}" >> "${OUTPUT}/dts/$(basename "${dtb}" | sed 's/\.dtb/.dts/')" || echo "[ERROR] Failed to decompile." + dtc -q -I dtb -O dts "${dtb}" >> "${OUTPUT}/dts/$(basename "${dtb}" .dtb).dts" || echo "[ERROR] Failed to decompile." done fi