Skip to content

add handling for p named partitions#1

Open
I-Iege wants to merge 1 commit intopneumus:masterfrom
I-Iege:master
Open

add handling for p named partitions#1
I-Iege wants to merge 1 commit intopneumus:masterfrom
I-Iege:master

Conversation

@I-Iege
Copy link
Copy Markdown

@I-Iege I-Iege commented Sep 9, 2025

Add p variable to handle cases where partitions created with p1 p2 naming instead of 1 2

Comment thread raspberry/arch_deploy.sh
print_color "Create MS-DOS MBR..." "blue"
sudo parted -s ${DEVICE} mklabel msdos > /dev/null 2>&1
print_color "Partitioning..." "blue"
sudo parted -s ${DEVICE} mkpart primary fat32 1MiB 513MiB > /dev/null 2>&1
Copy link
Copy Markdown
Author

@I-Iege I-Iege Sep 9, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do you use tabs?

Comment thread raspberry/arch_deploy.sh

format_partitions()
{
p=$(( ${#DEVICE} -gt 3 ? "p" : "" ))
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is bash syntax the shell syntax would be:
p=$([ ${#DEVICE} -gt 3 ] && "p" || "")

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant