zoobab / quickunpkg

quickunpkg, the other friend of gentoo's quickpkg
16 stars 2 forks source link

Remove temporary directory at the end of the script. #8

Open BetaRays opened 6 years ago

BetaRays commented 6 years ago

This is basically adding rm -rf "$WORKDIR" at the end of the file.

BetaRays commented 6 years ago

If you use set -e and emerge fails for some reason, the temporary directory won't get removed, which is why you should run everything except the temporary directory creation and removal (and set -e) in a subshell or use trap with the TERM signal.