-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add CLEAN_ONLY flag #51
Conversation
Let me think on this one. I haven't been happy with the mktemp change I made.. specifically because of the random dirs it makes. It also breaks adding I also tend to run |
Currently the way I implemented it the cleaning happens on demand, the auto clean was just an idea. What you said makes sense though as to why it should not happen automatically. I did not see a |
Yeah, the So like I have this in my snap.conf:
Makes it so ftp resumes where it left off when a download fails. |
Will that conflict? As far as I can tell with the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good! Wanna go ahead and merge it? Then I will sign everything.
Merged, thanks for the review. |
rm -rf $DST/snap.* | ||
else | ||
rm -rf /tmp/snap.* | ||
exit 0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I missed it before, but there was a missing fi
here. Please make sure you run the script after making changes, just to be sure it works!
Not sure how I missed that either. Will fix ASAP and get another PR in. |
No worries - I pushed a fix already (with slightly modified logic and comments explaining it :D) |
Thanks. Will be extra diligent about testing going forward. Thanks for the explanation and updated logic. |
When in an environment where there may be connectivity issues /tmp will be potentially filled by broken downloads. This happens as mktemp create new randomly named directories each time the script is run.
I know @qbit has issue #48 to remove some options but I felt this useful to add. I am not familiar with man page syntax so I did not add it there.
Thoughts? Perhaps it may be better to add cleaning of snap downloads in $DST or /tmp as the first step each time the script is run instead.