blob: dd4d06f32da957efee2f4d4efcbed128bf9fd68c (
plain) (
tree)
|
|
#!/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-bb")
tasks="build_busybox"
# chroot-exec /root/bin/build-bb.sh
;;
"shell")
tasks="shell"
;;
"build-initramfs-pkgs")
tasks="build_busybox build_packages build_kernel"
# 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|build-bb)"
exit 23
esac
cleanup_tmp
[ "x$tasks" != "x" ] && runtasks
exit 0
|