abuild-clean: add option to make files writable before cleanup

Some projects might leave files which are not writable for the current
user. The cleanup process then fails and leaves files / directories
behind.

This can easily be fixed by making everything writable before removing
the files.

Add the option 'chmod-clean' which does just that.
This commit is contained in:
Kevin Daudt 2019-03-03 19:15:00 +01:00 committed by Natanael Copa
parent 1d854182dd
commit 2e77e3390f
1 changed files with 3 additions and 0 deletions

View File

@ -77,6 +77,9 @@ want_check() {
}
default_cleanup_srcdir() {
if option_has options_has "chmod-clean" && test -d "$srcdir"; then
chmod -R +w "$srcdir"
fi
rm -rf "$srcdir"
}