Added resize prompt if it detects the disk size as too small.

This commit is contained in:
Storm Dragon 2021-10-23 16:57:13 -04:00
parent 404b624a3f
commit 46a35088c6

View File

@ -32,6 +32,15 @@ if [[ ! -d ~/Desktop ]]; then
xdg-user-dirs-update xdg-user-dirs-update
fi 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 while [[ "$choice" != "Exit" ]]; do
case "$choice" in case "$choice" in
"Change username") "Change username")