Mercurial > hg > aboriginal
comparison sources/native-builds/bootstrap-skeleton/files/functions.sh @ 1258:c264495fbf21
Update the common code, use "files" directory instead of build for subdir.
author | Rob Landley <rob@landley.net> |
---|---|
date | Thu, 07 Oct 2010 23:50:12 -0500 |
parents | sources/native-builds/bootstrap-skeleton/build/functions.sh@df70740df1a5 |
children |
comparison
equal
deleted
inserted
replaced
1257:1461d20bb6a7 | 1258:c264495fbf21 |
---|---|
1 #!/bin/echo This file is sourced not run | |
2 | |
3 upload_result() | |
4 { | |
5 ftpput $FTP_SERVER -P $FTP_PORT "$1-$HOST" "$1" | |
6 } | |
7 | |
8 set_titlebar() | |
9 { | |
10 echo -en "\033]2;($HOST) $1\007" | |
11 echo === "$1" | |
12 } | |
13 | |
14 dotprogress() | |
15 { | |
16 while read i; do echo -n .; done; echo | |
17 } | |
18 | |
19 do_in_chroot() | |
20 { | |
21 # Copy root filesystem into a new chroot directory and restart in there. | |
22 | |
23 CHROOT="$1" | |
24 shift | |
25 | |
26 set_titlebar "Setup chroot" | |
27 mkdir "$CHROOT" | |
28 cp -a /mnt/files/. "$CHROOT" | |
29 find / -xdev | cpio -m -v -p "$CHROOT" | dotprogress | |
30 for i in mnt proc sys dev; do mount --bind /$i "$CHROOT"/$i; done | |
31 | |
32 echo Chroot | |
33 chroot "$CHROOT" "$@" | |
34 RC=$? | |
35 | |
36 echo Chroot cleanup | |
37 for i in mnt proc sys dev; do umount "$CHROOT"/$i; done | |
38 | |
39 return $RC | |
40 } |