aboutsummaryrefslogtreecommitdiff
blob: 09a121d27ef035921435243634a6fde1a5e2a48c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
#!/bin/bash

source ${clst_shdir}/support/functions.sh

case $1 in
	enter)
	;;

	run)
		cp ${clst_shdir}/stage1/build.py ${clst_chroot_path}/tmp

		# Setup "ROOT in chroot" dir
		install -d ${clst_chroot_path}${clst_root_path}/etc
		install -d ${clst_chroot_path}${clst_root_path}/etc/portage

		# Setup make.conf and make.profile link in "ROOT in chroot":
		copy_to_chroot ${clst_chroot_path}/etc/portage/make.conf ${clst_root_path}/etc/portage

		# Enter chroot, execute our build script
		exec_in_chroot \
			${clst_shdir}/${clst_target}/${clst_target}-chroot.sh \
			|| exit 1
	;;

	preclean)
		exec_in_chroot ${clst_shdir}/${clst_target}/${clst_target}-preclean-chroot.sh || exit 1
	;;

	clean)
		# Clean out man, info and doc files
		rm -rf usr/share/{man,doc,info}/*
		# Zap all .pyc and .pyo files
		find . -iname "*.py[co]" -exec rm -f {} \;
	;;

	*)
		exit 1
	;;
esac
exit $?