Hello,
I found two questions, the first is about the use of gparted (where the letter G means it has a graphical window). In this case, if it is a requirement, then the script cannot be used for the light version without desktop graphics support?
Ref.: https://askubuntu.com/questions/386420/how-to-open-gparted-terminal
Another thing is about the expected result after using the script, will it produce an *.img file in the folder where the script is, or in the folder where the command was executed, or is it possible to direct the output folder?