mirror of
https://gitlab.archlinux.org/tpowa/archboot.git
synced 2024-09-20 03:50: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"
|
rm -f -- "${_ROOTFS}/var/cache/ldconfig/aux-cache"
|
||||||
if [[ -n "${_GENERATE_IMAGE}" ]]; then
|
if [[ -n "${_GENERATE_IMAGE}" ]]; then
|
||||||
_create_cpio "${_GENERATE_IMAGE}" "${_COMP}" || exit 1
|
_create_cpio "${_GENERATE_IMAGE}" "${_COMP}" || exit 1
|
||||||
|
_cleanup
|
||||||
echo "Build complete."
|
echo "Build complete."
|
||||||
elif [[ -n "${_TARGET_DIR}" ]]; then
|
elif [[ -n "${_TARGET_DIR}" ]]; then
|
||||||
|
_cleanup
|
||||||
echo "Build directory complete."
|
echo "Build directory complete."
|
||||||
else
|
else
|
||||||
|
_cleanup
|
||||||
echo "Dry run complete."
|
echo "Dry run complete."
|
||||||
fi
|
fi
|
||||||
# vim: set ft=sh ts=4 sw=4 et:
|
# vim: set ft=sh ts=4 sw=4 et:
|
||||||
|
|
|
@ -31,10 +31,13 @@ EOF
|
||||||
|
|
||||||
_abort() {
|
_abort() {
|
||||||
echo "ERROR:" "$@"
|
echo "ERROR:" "$@"
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
|
||||||
|
_cleanup() {
|
||||||
if [[ -n "${_BUILD_DIR}" ]]; then
|
if [[ -n "${_BUILD_DIR}" ]]; then
|
||||||
rm -rf -- "${_BUILD_DIR}"
|
rm -rf -- "${_BUILD_DIR}"
|
||||||
fi
|
fi
|
||||||
exit 1
|
|
||||||
}
|
}
|
||||||
|
|
||||||
_builtin_modules() {
|
_builtin_modules() {
|
||||||
|
|
Loading…
Reference in a new issue