mirror of
https://gitlab.archlinux.org/tpowa/archboot.git
synced 2024-09-19 19:40:37 +02:00
add correct cleanup
This commit is contained in:
parent
02bb17c6af
commit
f4e4b9f403
2 changed files with 7 additions and 1 deletions
|
@ -88,10 +88,13 @@ ldconfig -r "${_ROOTFS}" &>"${_NO_LOG}" || exit 1
|
|||
rm -f -- "${_ROOTFS}/var/cache/ldconfig/aux-cache"
|
||||
if [[ -n "${_GENERATE_IMAGE}" ]]; then
|
||||
_create_cpio "${_GENERATE_IMAGE}" "${_COMP}" || exit 1
|
||||
_cleanup
|
||||
echo "Build complete."
|
||||
elif [[ -n "${_TARGET_DIR}" ]]; then
|
||||
_cleanup
|
||||
echo "Build directory complete."
|
||||
else
|
||||
_cleanup
|
||||
echo "Dry run complete."
|
||||
fi
|
||||
# vim: set ft=sh ts=4 sw=4 et:
|
||||
|
|
|
@ -31,10 +31,13 @@ EOF
|
|||
|
||||
_abort() {
|
||||
echo "ERROR:" "$@"
|
||||
exit 1
|
||||
}
|
||||
|
||||
_cleanup() {
|
||||
if [[ -n "${_BUILD_DIR}" ]]; then
|
||||
rm -rf -- "${_BUILD_DIR}"
|
||||
fi
|
||||
exit 1
|
||||
}
|
||||
|
||||
_builtin_modules() {
|
||||
|
|
Loading…
Reference in a new issue