I need some help with my imaging script.

I made a script which download image on computer, and it's work fine
(delete all partition, and download image, reboot, ...).

I want to add a new function : uploading a image of the computer.

In fact, when i type "10" on keybord, it ask me the name of the image i
would like having, and then, make an image in a specific floder in the

The problem, i'm not developper, and i don't know how working with
variables ($ZMGNAME = name of image i type on keyboard).

Thanks for your help.