From 46a35088c6406a887bce4ab7a618a83656afa089 Mon Sep 17 00:00:00 2001 From: Storm Dragon Date: Sat, 23 Oct 2021 16:57:13 -0400 Subject: [PATCH] Added resize prompt if it detects the disk size as too small. --- configure-stormux.sh | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/configure-stormux.sh b/configure-stormux.sh index 289df9f..849566b 100755 --- a/configure-stormux.sh +++ b/configure-stormux.sh @@ -32,6 +32,15 @@ if [[ ! -d ~/Desktop ]]; then xdg-user-dirs-update fi +# Check for possible resize +diskSource="$(df --output='source' / | tail -1)" +diskSize="$(df -h --output='size' / | tail -1 | tr -cd '[:digit:]')" +if [[ $diskSize -le 5 ]]; then + if [[ "$(yesno "$diskSource is only $diskSize gigs, which means it probably needs to be resized. Would you like to do this now?")" == "Yes" ]]; then + sudo growpartfs $diskSource + fi +fi + while [[ "$choice" != "Exit" ]]; do case "$choice" in "Change username")