summaryrefslogtreecommitdiff
path: root/build64
blob: 41bea4a82d88be49e2ac8a7a90971ec47aea6ad1 (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
#!/usr/bin/env bash

chrootpreparex64 () {
	# check our environment for sanity
	# if safe, trigger start && break the loop to build packages
	# else trigger stop && cleanup && check again
	while : true ; do
		if [[ ! -d "$rodir" && ! -d "$rwdir" && ! -d "$overlaydir" ]] ; then
			for i in "$rodir" "$rwdir" "$overlaydir" ; do
				mkdir "$i"
			done
			chrootstartx64
			break
		elif [[ -d "$rodir" && -d "$rwdir" && -d "$overlaydir" ]] ; then
			chrootstop
			for i in "$rodir" "$rwdir" "$overlaydir" ; do
				rm -rf "$i"
			done
			continue
		fi
	done
}

main () {
	if checkroot ; then
		chrootchecksumx64
		chrootpreparex64
		chrootoverlaysx64
		chrootbuildsystemx64
		chrootbuildx64
		chrootx64
		chrootstop
	fi
}

main 
exit 0