grahampugh / erase-install

A script that automates downloading macOS installers, and optionally erasing or upgrading macOS in a single process. Watch the video!
https://grahamrpugh.com/2023/05/14/macaduk-presentation-eraseinstall.html
Apache License 2.0
834 stars 131 forks source link

[BUG?] Dont delete Logs after CleanUp #502

Closed mazeo2112 closed 4 months ago

mazeo2112 commented 4 months ago

Hey,

not sure if BUG or FR, but I also tried to edit the script to avoid deleting the logs after successfully upgraded, but with the cleanup-after trigger.

I tried to replace Log directory to /LIbrary/Logs/erase-install, but also in this place the logs will be deleted after Upgrade. I cant find the Line in wich this is provided that the $logdir will always be deleted.

Can you guys help me with that?

Thanks in advance and great jobs on this tool! Maze

grahampugh commented 4 months ago

Hi there, that should not be happening unless you are using the --cleanup-after-use option?

mazeo2112 commented 4 months ago

Hey, yes we do, because we want to clear /Library/Management after Upgrade, but still want to have the logs.

grahampugh commented 4 months ago

So that is not a bug, it's working as intended.

But you could use a --postinstall-command flag to copy the log to another location, so long as the permissions are correct. /Users/Shared for example.

mazeo2112 commented 4 months ago

Many Thanks!

great Idea!