summaryrefslogtreecommitdiff
path: root/resources/scripts/build/clean
diff options
context:
space:
mode:
Diffstat (limited to 'resources/scripts/build/clean')
-rwxr-xr-xresources/scripts/build/clean/seabios6
1 files changed, 4 insertions, 2 deletions
diff --git a/resources/scripts/build/clean/seabios b/resources/scripts/build/clean/seabios
index b8b17068..e9b11e5b 100755
--- a/resources/scripts/build/clean/seabios
+++ b/resources/scripts/build/clean/seabios
@@ -21,16 +21,18 @@
[ "x${DEBUG+set}" = 'xset' ] && set -v
set -u -e
+. "include/err.sh"
+
# clean bucts
# --------------------------------------------------------
printf "Cleaning the previous builds of seabios\n"
-rm -Rf elf/seabios || exit 1
+[ ! -d "elf/seabios" ] || rm -Rf elf/seabios || err "cannot remove elf/seabios"
[ ! -d "seabios/" ] && exit 0
for x in seabios/*; do
[ "${x}" = "seabios/seabios" ] && continue
[ ! -d "${x}" ] && continue
- make -C "${x}" distclean || exit 1
+ make -C "${x}" distclean || err "cannot distclean tree, ${x}"
done