From 1586e3d3def51e3055d8429def3f84558a32cfd2 Mon Sep 17 00:00:00 2001 From: Oswaldo Zerpa Date: Thu, 26 Nov 2020 23:10:36 -0500 Subject: [PATCH] Initial script for partition maximizer --- pmax.sh | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 pmax.sh diff --git a/pmax.sh b/pmax.sh new file mode 100644 index 0000000..e5f6b96 --- /dev/null +++ b/pmax.sh @@ -0,0 +1,24 @@ +#! /bin/sh +apk add --no-cache parted e2fsprogs-extra +lsblk +read -r -p "Do you want to expand / partition to max available size? Choose \"No\" to continue without expanding partition [y/N]: " response + case $response in + [yY][eE][sS]|[yY]) + echo "Expanding / partition..." + PARTEND=`printf %s\\n 'unit GB print list' | parted | grep "Disk /dev/sda" | cut -d' ' -f3 | tr -d GB`GB + parted /dev/sda ---pretend-input-tty <