summaryrefslogtreecommitdiffstats
path: root/inc/bootstrap.inc.sh
blob: c7965bd74dbac1b4ac94c573607de480906be43a (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

bootstrap () {
  [ ! -d $buildrootpath ] && mkdir -p $buildrootpath

  echo "broot is going to run debootsrap now:                        ~-_"
  echo "   depending on your machine/connection this can            _-~ "
  echo "   take up to 20min.. time enough for a coffee ;)         c|_|  "
  echo "press Strg-c to abbort"
  echo -n "Starting debootsrap in .. "
  echo -en "${R}3${NONE} " && sleep 1 && \
  echo -en "${R}2${NONE} " && sleep 1 && \
  echo -en "${R}1${NONE} " && sleep 1 && \
  echo ".. go "

  debootstrap --arch="i386" squeeze $buildrootpath http://ftp.de.debian.org/debian
  touch $buildrootpath/bootstraped
  sed -i -e "s,main,main non-free," $buildrootpath/etc/apt/sources.list
  setupBindmounts $buildrootpath
  updatebuildroot $buildrootpath
  chroot-exec aptitude update
  chroot-apt-installinstall locales
  sed -i -e "s,^#.*\(en_US.*\)$,\1," $buildrootpath/etc/locale.gen
  chroot-exec locale-gen
  chroot-aptinstall build-essential
  chroot-aptinstall git-core subversion
  chroot-aptinstall firmware-iwlwifi firmware-linux firmware-linux-free firmware-linux-nonfree linux-image-2.6.32-trunk-686-bigmem

  mkdir -p  $buildrootpath/root/bin
  cp ./chroot-scripts/* $buildrootpath/root/bin/
  chmod 700 $buildrootpath/root/bin/*
  
  chroot-exec /root/bin/build-bb.sh

  destroyBindmounts 

}