Added resize prompt if it detects the disk size as too small.
This commit is contained in:
parent
404b624a3f
commit
46a35088c6
@ -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")
|
||||||
|
Loading…
Reference in New Issue
Block a user