diff options
author | Luke Shumaker <LukeShu@sbcglobal.net> | 2013-09-14 17:00:05 -0400 |
---|---|---|
committer | Luke Shumaker <LukeShu@sbcglobal.net> | 2013-09-14 17:00:05 -0400 |
commit | 19cc5956ac565b0abc349e8b3f8275ae1168bd3b (patch) | |
tree | ba926e35059b832d109363cbcf03c23655904a16 /src/chroot-tools/libremakepkg | |
parent | 564a4cfa06a8a1cf880583669cc578f8cc45dc44 (diff) |
libremakepkg: clean up temporary files created by prepare_chroot
Diffstat (limited to 'src/chroot-tools/libremakepkg')
-rwxr-xr-x | src/chroot-tools/libremakepkg | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/chroot-tools/libremakepkg b/src/chroot-tools/libremakepkg index 5494202..99c448f 100755 --- a/src/chroot-tools/libremakepkg +++ b/src/chroot-tools/libremakepkg @@ -88,8 +88,15 @@ add_to_local_repo() { done } +hook_post_build+=('cleanup') +cleanup() { + local copydir=$1 + rm -f -- "$copydir"/chroot{prepare,build} +} + build() ( local copydir=$1; shift + local repack=$1; shift local netflag='' local run=() @@ -101,6 +108,7 @@ build() ( run=(librechroot "${librechroot_flags[@]}" run) fi + prepare_chroot "$copydir" "$LIBREHOME" "$repack" false "${run[@]}" /chrootprepare "$@" run_hook pre_build "$copydir" trap "run_hook post_build '$copydir'" EXIT @@ -237,11 +245,10 @@ main() { # Pre-build run_hook check_pkgbuild download_sources "$copydir" "$LIBREUSER" - prepare_chroot "$copydir" "$LIBREHOME" "$repack" false # Build trap "exit_copy '$copydir' '$LIBREUSER'" EXIT - build "$copydir" "${makepkg_args[@]}" + build "$copydir" "$repack" "${makepkg_args[@]}" # Post-build run_hook check_pkg |