summaryrefslogtreecommitdiff
path: root/src/chroot-tools/hooks-chcleanup.sh
diff options
context:
space:
mode:
Diffstat (limited to 'src/chroot-tools/hooks-chcleanup.sh')
-rw-r--r--src/chroot-tools/hooks-chcleanup.sh7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/chroot-tools/hooks-chcleanup.sh b/src/chroot-tools/hooks-chcleanup.sh
index 09e6dd9..86c872c 100644
--- a/src/chroot-tools/hooks-chcleanup.sh
+++ b/src/chroot-tools/hooks-chcleanup.sh
@@ -1,16 +1,15 @@
#!/usr/bin/env bash
set -euE
-hooks_pre_build+=("clean_chroot")
+hook_pre_build+=("clean_chroot")
clean_chroot() (
set +x
local copydir=$1
if $INCHROOT; then
- cd /build
+ cd /startdir
sudo -u nobody "$(librelib chroot/chcleanup)"
else
- librechroot -l "$copydir" clean-pkgs
+ librechroot "${librechroot_flags[@]}" clean-pkgs
fi
- r=$?; echo clean_chroot returning $r; return $r
)