munki / macadmin-scripts

Scripts of possible interest to macOS admins
Other
2.33k stars 523 forks source link

Delete download data during disk creation. Free up disk space #40

Closed relikd closed 4 years ago

relikd commented 4 years ago

Hey there, just a quick question if it might be a good idea to delete the content folder as soon as the sparse image is created. I have very limited disk space and downloading and building an image takes 3x the space of the image. 8GB for the content folder, another 8GB for the sparseimage and an additional 8GB for the final image. So once I run the script my mac starts to complain about disk space sooner or later.

Another thing. Why does the --help command need to be run as root?

gregneagle commented 4 years ago

Way less code for me to write and test if the user can just use other tools like rm to optionally remove the content folder if they so desire.

Same with --help: everything else needs sudo/root; adding more code to if/then around the --help option is again more work for me.