Mercurial > hg > aboriginal
annotate sources/native-builds/gentoo-bootstrap/build/functions.sh @ 1252:ba951c11fb48
Refactor the gentoo bootstrap build some more. Add "build" and "files" subdirectories, split each package build into a separate file, break out reusable shell functions into functions.sh. Flow control now init chrooting into run-build-stages.sh calling the individual package scripts.
author | Rob Landley <rob@landley.net> |
---|---|
date | Sat, 25 Sep 2010 13:40:04 -0500 |
parents | |
children |
rev | line source |
---|---|
1252
ba951c11fb48
Refactor the gentoo bootstrap build some more. Add "build" and "files" subdirectories, split each package build into a separate file, break out reusable shell functions into functions.sh. Flow control now init chrooting into run-build-stages.sh calling the individual package scripts.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
1 #!/bin/echo This file is sourced not run |
ba951c11fb48
Refactor the gentoo bootstrap build some more. Add "build" and "files" subdirectories, split each package build into a separate file, break out reusable shell functions into functions.sh. Flow control now init chrooting into run-build-stages.sh calling the individual package scripts.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
2 |
ba951c11fb48
Refactor the gentoo bootstrap build some more. Add "build" and "files" subdirectories, split each package build into a separate file, break out reusable shell functions into functions.sh. Flow control now init chrooting into run-build-stages.sh calling the individual package scripts.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
3 upload_result() |
ba951c11fb48
Refactor the gentoo bootstrap build some more. Add "build" and "files" subdirectories, split each package build into a separate file, break out reusable shell functions into functions.sh. Flow control now init chrooting into run-build-stages.sh calling the individual package scripts.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
4 { |
ba951c11fb48
Refactor the gentoo bootstrap build some more. Add "build" and "files" subdirectories, split each package build into a separate file, break out reusable shell functions into functions.sh. Flow control now init chrooting into run-build-stages.sh calling the individual package scripts.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
5 ftpput $FTP_SERVER -P $FTP_PORT "$1-$HOST" "$1" |
ba951c11fb48
Refactor the gentoo bootstrap build some more. Add "build" and "files" subdirectories, split each package build into a separate file, break out reusable shell functions into functions.sh. Flow control now init chrooting into run-build-stages.sh calling the individual package scripts.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
6 } |
ba951c11fb48
Refactor the gentoo bootstrap build some more. Add "build" and "files" subdirectories, split each package build into a separate file, break out reusable shell functions into functions.sh. Flow control now init chrooting into run-build-stages.sh calling the individual package scripts.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
7 |
ba951c11fb48
Refactor the gentoo bootstrap build some more. Add "build" and "files" subdirectories, split each package build into a separate file, break out reusable shell functions into functions.sh. Flow control now init chrooting into run-build-stages.sh calling the individual package scripts.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
8 set_titlebar() |
ba951c11fb48
Refactor the gentoo bootstrap build some more. Add "build" and "files" subdirectories, split each package build into a separate file, break out reusable shell functions into functions.sh. Flow control now init chrooting into run-build-stages.sh calling the individual package scripts.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
9 { |
ba951c11fb48
Refactor the gentoo bootstrap build some more. Add "build" and "files" subdirectories, split each package build into a separate file, break out reusable shell functions into functions.sh. Flow control now init chrooting into run-build-stages.sh calling the individual package scripts.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
10 echo -en "\033]2;($HOST) $1\007" |
ba951c11fb48
Refactor the gentoo bootstrap build some more. Add "build" and "files" subdirectories, split each package build into a separate file, break out reusable shell functions into functions.sh. Flow control now init chrooting into run-build-stages.sh calling the individual package scripts.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
11 echo === "$1" |
ba951c11fb48
Refactor the gentoo bootstrap build some more. Add "build" and "files" subdirectories, split each package build into a separate file, break out reusable shell functions into functions.sh. Flow control now init chrooting into run-build-stages.sh calling the individual package scripts.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
12 } |
ba951c11fb48
Refactor the gentoo bootstrap build some more. Add "build" and "files" subdirectories, split each package build into a separate file, break out reusable shell functions into functions.sh. Flow control now init chrooting into run-build-stages.sh calling the individual package scripts.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
13 |
ba951c11fb48
Refactor the gentoo bootstrap build some more. Add "build" and "files" subdirectories, split each package build into a separate file, break out reusable shell functions into functions.sh. Flow control now init chrooting into run-build-stages.sh calling the individual package scripts.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
14 dotprogress() |
ba951c11fb48
Refactor the gentoo bootstrap build some more. Add "build" and "files" subdirectories, split each package build into a separate file, break out reusable shell functions into functions.sh. Flow control now init chrooting into run-build-stages.sh calling the individual package scripts.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
15 { |
ba951c11fb48
Refactor the gentoo bootstrap build some more. Add "build" and "files" subdirectories, split each package build into a separate file, break out reusable shell functions into functions.sh. Flow control now init chrooting into run-build-stages.sh calling the individual package scripts.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
16 while read i; do echo -n .; done; echo |
ba951c11fb48
Refactor the gentoo bootstrap build some more. Add "build" and "files" subdirectories, split each package build into a separate file, break out reusable shell functions into functions.sh. Flow control now init chrooting into run-build-stages.sh calling the individual package scripts.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
17 } |
ba951c11fb48
Refactor the gentoo bootstrap build some more. Add "build" and "files" subdirectories, split each package build into a separate file, break out reusable shell functions into functions.sh. Flow control now init chrooting into run-build-stages.sh calling the individual package scripts.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
18 |
ba951c11fb48
Refactor the gentoo bootstrap build some more. Add "build" and "files" subdirectories, split each package build into a separate file, break out reusable shell functions into functions.sh. Flow control now init chrooting into run-build-stages.sh calling the individual package scripts.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
19 do_in_chroot() |
ba951c11fb48
Refactor the gentoo bootstrap build some more. Add "build" and "files" subdirectories, split each package build into a separate file, break out reusable shell functions into functions.sh. Flow control now init chrooting into run-build-stages.sh calling the individual package scripts.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
20 { |
ba951c11fb48
Refactor the gentoo bootstrap build some more. Add "build" and "files" subdirectories, split each package build into a separate file, break out reusable shell functions into functions.sh. Flow control now init chrooting into run-build-stages.sh calling the individual package scripts.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
21 # Copy root filesystem into a new chroot directory and restart in there. |
ba951c11fb48
Refactor the gentoo bootstrap build some more. Add "build" and "files" subdirectories, split each package build into a separate file, break out reusable shell functions into functions.sh. Flow control now init chrooting into run-build-stages.sh calling the individual package scripts.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
22 |
ba951c11fb48
Refactor the gentoo bootstrap build some more. Add "build" and "files" subdirectories, split each package build into a separate file, break out reusable shell functions into functions.sh. Flow control now init chrooting into run-build-stages.sh calling the individual package scripts.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
23 CHROOT="$1" |
ba951c11fb48
Refactor the gentoo bootstrap build some more. Add "build" and "files" subdirectories, split each package build into a separate file, break out reusable shell functions into functions.sh. Flow control now init chrooting into run-build-stages.sh calling the individual package scripts.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
24 shift |
ba951c11fb48
Refactor the gentoo bootstrap build some more. Add "build" and "files" subdirectories, split each package build into a separate file, break out reusable shell functions into functions.sh. Flow control now init chrooting into run-build-stages.sh calling the individual package scripts.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
25 |
ba951c11fb48
Refactor the gentoo bootstrap build some more. Add "build" and "files" subdirectories, split each package build into a separate file, break out reusable shell functions into functions.sh. Flow control now init chrooting into run-build-stages.sh calling the individual package scripts.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
26 set_titlebar "Setup chroot" |
ba951c11fb48
Refactor the gentoo bootstrap build some more. Add "build" and "files" subdirectories, split each package build into a separate file, break out reusable shell functions into functions.sh. Flow control now init chrooting into run-build-stages.sh calling the individual package scripts.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
27 mkdir "$CHROOT" |
ba951c11fb48
Refactor the gentoo bootstrap build some more. Add "build" and "files" subdirectories, split each package build into a separate file, break out reusable shell functions into functions.sh. Flow control now init chrooting into run-build-stages.sh calling the individual package scripts.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
28 cp -a /mnt/files/. "$CHROOT" |
ba951c11fb48
Refactor the gentoo bootstrap build some more. Add "build" and "files" subdirectories, split each package build into a separate file, break out reusable shell functions into functions.sh. Flow control now init chrooting into run-build-stages.sh calling the individual package scripts.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
29 find / -xdev | cpio -m -v -p "$CHROOT" | dotprogress |
ba951c11fb48
Refactor the gentoo bootstrap build some more. Add "build" and "files" subdirectories, split each package build into a separate file, break out reusable shell functions into functions.sh. Flow control now init chrooting into run-build-stages.sh calling the individual package scripts.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
30 for i in mnt proc sys dev; do mount --bind /$i "$CHROOT"/$i; done |
ba951c11fb48
Refactor the gentoo bootstrap build some more. Add "build" and "files" subdirectories, split each package build into a separate file, break out reusable shell functions into functions.sh. Flow control now init chrooting into run-build-stages.sh calling the individual package scripts.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
31 |
ba951c11fb48
Refactor the gentoo bootstrap build some more. Add "build" and "files" subdirectories, split each package build into a separate file, break out reusable shell functions into functions.sh. Flow control now init chrooting into run-build-stages.sh calling the individual package scripts.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
32 echo Chroot |
ba951c11fb48
Refactor the gentoo bootstrap build some more. Add "build" and "files" subdirectories, split each package build into a separate file, break out reusable shell functions into functions.sh. Flow control now init chrooting into run-build-stages.sh calling the individual package scripts.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
33 chroot "$CHROOT" "$@" |
ba951c11fb48
Refactor the gentoo bootstrap build some more. Add "build" and "files" subdirectories, split each package build into a separate file, break out reusable shell functions into functions.sh. Flow control now init chrooting into run-build-stages.sh calling the individual package scripts.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
34 RC=$? |
ba951c11fb48
Refactor the gentoo bootstrap build some more. Add "build" and "files" subdirectories, split each package build into a separate file, break out reusable shell functions into functions.sh. Flow control now init chrooting into run-build-stages.sh calling the individual package scripts.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
35 |
ba951c11fb48
Refactor the gentoo bootstrap build some more. Add "build" and "files" subdirectories, split each package build into a separate file, break out reusable shell functions into functions.sh. Flow control now init chrooting into run-build-stages.sh calling the individual package scripts.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
36 echo Chroot cleanup |
ba951c11fb48
Refactor the gentoo bootstrap build some more. Add "build" and "files" subdirectories, split each package build into a separate file, break out reusable shell functions into functions.sh. Flow control now init chrooting into run-build-stages.sh calling the individual package scripts.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
37 for i in mnt proc sys dev; do umount "$CHROOT"/$i; done |
ba951c11fb48
Refactor the gentoo bootstrap build some more. Add "build" and "files" subdirectories, split each package build into a separate file, break out reusable shell functions into functions.sh. Flow control now init chrooting into run-build-stages.sh calling the individual package scripts.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
38 |
ba951c11fb48
Refactor the gentoo bootstrap build some more. Add "build" and "files" subdirectories, split each package build into a separate file, break out reusable shell functions into functions.sh. Flow control now init chrooting into run-build-stages.sh calling the individual package scripts.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
39 return $RC |
ba951c11fb48
Refactor the gentoo bootstrap build some more. Add "build" and "files" subdirectories, split each package build into a separate file, break out reusable shell functions into functions.sh. Flow control now init chrooting into run-build-stages.sh calling the individual package scripts.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
40 } |