Skip to content

Commit

Permalink
chore(dtb): use 'basename' to remove '.dtb' file extension
Browse files Browse the repository at this point in the history
  • Loading branch information
AntoninoScordino committed Nov 2, 2024
1 parent fb5008e commit 9994180
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions extract_and_push.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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

Expand Down

0 comments on commit 9994180

Please sign in to comment.