Skip to content

Commit

Permalink
chore: use 'mkdir' only once
Browse files Browse the repository at this point in the history
  • Loading branch information
AntoninoScordino committed Nov 2, 2024
1 parent 272c458 commit 3191818
Showing 1 changed file with 4 additions and 9 deletions.
13 changes: 4 additions & 9 deletions extract_and_push.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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..."
Expand Down Expand Up @@ -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..."
Expand Down Expand Up @@ -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..."
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 3191818

Please sign in to comment.