summaryrefslogblamecommitdiffstats
path: root/broot.sh
blob: e3d2c747850ddefaebe59731559fc1d4eb0da62f (plain) (tree)
1
2
3
4
5
6
7
8
9


                                                                     
                        



          
                                                 

           
                                         
      


                                          
      


















                                                                             
      
    

                                                 
    




                                
#!/bin/bash

. ./inc/env.inc.sh                    # read slx config to find paths
. ./inc/functions.inc.sh


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
    ;;
  "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