blob: b98afaf4ba6fc26a29c112a0fd4e14968a759b6b (
plain) (
blame)
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
41
42
43
44
45
46
47
48
49
50
51
52
53
|
#!/bin/bash
. ./inc/env.inc.sh # read slx config to find paths
. ./inc/functions.inc.sh
if [ "$(whoami)" != "root" ]; then
echo " You need to be root"
exit 12
fi
case $1 in
"setup")
tasks="bootstrap locales update buildtools"
;;
"update")
tasks="update update_chrootscripts"
;;
"build-busybox")
tasks="build_busybox"
# chroot-exec /root/bin/build-bb.sh
;;
"shell")
tasks="shell"
;;
"build-core-pkgs")
tasks="update_chrootscripts build_core"
# updateScripts
# chroot-exec /root/bin/build-preboot.sh
;;
"purge")
destroyBindmounts >/dev/null 2>&1
# just to be sure nothing is mounted anymore
destroyBindmounts >/dev/null 2>&1
# now we're hopefully on the safe side
destroyBindmounts >/dev/null 2>&1
# better safe than sorry
destroyBindmounts >/dev/null 2>&1
rm -rf $BROOT_BUILDROOT_PATH
echo "Buildroot was removed successfully."
;;
"resume")
[ -f $BROOT_BUILDROOT_PATH/.resume ] && . $BROOT_BUILDROOT_PATH/.resume
;;
*)
echo "Usage: broot (setup|update|shell|build-busybox|build-core-pks)"
exit 23
esac
cleanup_tmp
[ "x$tasks" != "x" ] && runtasks
exit 0
|