blob: d8590b5b806ed8a7cd7d8bad68493fad309f28c1 (
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
|
#!/usr/bin/env bash
chrootprepare () {
# 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 "$workdir" && ! -d "$overlaydir" ]] ; then
for i in "$rodir" "$rwdir" "$workdir" "$overlaydir" ; do
mkdir "$i"
done
chrootstart
break
elif [[ -d "$rodir" && -d "$rwdir" && -d "$workdir" && -d "$overlaydir" ]] ; then
chrootstop
for i in "$rodir" "$rwdir" "$workdir" "$overlaydir" ; do
rm -rf "$i"
done
continue
fi
done
}
main () {
chrootchecksum
chrootprepare
chrootoverlays
chrootbuildsystem
chrootdevtree
chrootbuild
chrootx64
chrootstop
}
main
exit 0
|