From 3191818c87d3613599064cdbc573977fb989fb0e Mon Sep 17 00:00:00 2001 From: ant Date: Fri, 1 Nov 2024 16:11:12 +0100 Subject: [PATCH] chore: use 'mkdir' only once --- extract_and_push.sh | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/extract_and_push.sh b/extract_and_push.sh index d9edfd5..a38bda6 100755 --- a/extract_and_push.sh +++ b/extract_and_push.sh @@ -336,8 +336,7 @@ if [[ -f "${PWD}/boot.img" ]]; then OUTPUT=${PWD}/boot # Create necessary directories - mkdir -p "${OUTPUT}/dts" - mkdir -p "${OUTPUT}/dtb" + mkdir -p "${OUTPUT}/dts" "${OUTPUT}/dtb" # Extract device-tree blobs from 'boot.img' echo "[INFO] Extracting device-tree blobs..." @@ -405,9 +404,7 @@ if [[ -f "${PWD}/vendor_boot.img" ]]; then OUTPUT=${PWD}/vendor_boot # Create necessary directories - mkdir -p "${OUTPUT}/dts" - mkdir -p "${OUTPUT}/dtb" - mkdir -p "${OUTPUT}/ramdisk" + mkdir -p "${OUTPUT}/dts" "${OUTPUT}/dtb" "${OUTPUT}/ramdisk" # Extract device-tree blobs from 'vendor_boot.img' echo "[INFO] Extracting device-tree blobs..." @@ -453,8 +450,7 @@ if [[ -f "${PWD}/vendor_kernel_boot.img" ]]; then OUTPUT=${PWD}/vendor_kernel_boot # Create necessary directories - mkdir -p "${OUTPUT}/dts" - mkdir -p "${OUTPUT}/dtb" + mkdir -p "${OUTPUT}/dts" "${OUTPUT}/dtb" # Extract device-tree blobs from 'vendor_kernel_boot.img' echo "[INFO] Extracting device-tree blobs..." @@ -500,8 +496,7 @@ if [[ -f "${PWD}/init_boot.img" ]]; then OUTPUT=${PWD}/init_boot # Create necessary directories - mkdir -p "${OUTPUT}/dts" - mkdir -p "${OUTPUT}/dtb" + mkdir -p "${OUTPUT}/dts" "${OUTPUT}/dtb" # Python rewrite automatically extracts such partitions if [[ "${USE_ALT_DUMPER}" == "false" ]]; then