summaryrefslogtreecommitdiff
path: root/src/chroot-tools/hooks-chcleanup.sh
blob: cd6179b9e19f4f7419a3480bac8ab372f04546ff (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#!/bin/bash -euE

hooks_pre_build+=("clean_chroot")

clean_chroot() (
	set +x
	local copydir=$1
	if $INCHROOT; then
		cd /build
		sudo -u nobody "$(librelib chroot/chcleanup)"
	else
		librechroot "${librechroot_flags[@]}" clean-pkgs
	fi
)