Mercurial > hg > aboriginal
annotate sources/native-builds/gentoo-bootstrap/mnt/files/emerge_wrapper.sh @ 1259:3ffcb56847e3
Redo gentoo-boostrap on top of bootstrap-skeleton.
author | Rob Landley <rob@landley.net> |
---|---|
date | Thu, 07 Oct 2010 23:52:23 -0500 |
parents | sources/native-builds/gentoo-bootstrap/files/emerge_wrapper.sh@204238871b7c |
children |
rev | line source |
---|---|
1112
25607cc50c8f
Update gentoo-stage1 build to actually build portage. (Doesn't install a tree yet.)
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
1 #!/bin/bash |
25607cc50c8f
Update gentoo-stage1 build to actually build portage. (Doesn't install a tree yet.)
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
2 |
25607cc50c8f
Update gentoo-stage1 build to actually build portage. (Doesn't install a tree yet.)
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
3 if [ "$1" != "--sync" ] |
25607cc50c8f
Update gentoo-stage1 build to actually build portage. (Doesn't install a tree yet.)
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
4 then |
25607cc50c8f
Update gentoo-stage1 build to actually build portage. (Doesn't install a tree yet.)
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
5 echo 'No portage tree, run "emerge --sync".' >&2 |
25607cc50c8f
Update gentoo-stage1 build to actually build portage. (Doesn't install a tree yet.)
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
6 exit 1 |
25607cc50c8f
Update gentoo-stage1 build to actually build portage. (Doesn't install a tree yet.)
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
7 fi |
25607cc50c8f
Update gentoo-stage1 build to actually build portage. (Doesn't install a tree yet.)
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
8 |
25607cc50c8f
Update gentoo-stage1 build to actually build portage. (Doesn't install a tree yet.)
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
9 if [ "$(id -u)" -ne 0 ] |
25607cc50c8f
Update gentoo-stage1 build to actually build portage. (Doesn't install a tree yet.)
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
10 then |
25607cc50c8f
Update gentoo-stage1 build to actually build portage. (Doesn't install a tree yet.)
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
11 echo "You are not root." >&2 |
25607cc50c8f
Update gentoo-stage1 build to actually build portage. (Doesn't install a tree yet.)
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
12 exit 1 |
25607cc50c8f
Update gentoo-stage1 build to actually build portage. (Doesn't install a tree yet.)
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
13 fi |
25607cc50c8f
Update gentoo-stage1 build to actually build portage. (Doesn't install a tree yet.)
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
14 |
25607cc50c8f
Update gentoo-stage1 build to actually build portage. (Doesn't install a tree yet.)
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
15 echo "Downloading portage tree..." |
1202
75d179a52475
Bootstrapping gentoo portage tree. Download tarball, extract it, and emerge --sync. (Build rsync so emerge --sync works.)
Rob Landley <rob@landley.net>
parents:
1112
diff
changeset
|
16 mkdir -p /var/log /usr/portage && |
75d179a52475
Bootstrapping gentoo portage tree. Download tarball, extract it, and emerge --sync. (Build rsync so emerge --sync works.)
Rob Landley <rob@landley.net>
parents:
1112
diff
changeset
|
17 cd /usr && |
75d179a52475
Bootstrapping gentoo portage tree. Download tarball, extract it, and emerge --sync. (Build rsync so emerge --sync works.)
Rob Landley <rob@landley.net>
parents:
1112
diff
changeset
|
18 #wget http://127.0.0.1/aboriginal/mirror/portage-latest.tar.bz2 -O - | \ |
1112
25607cc50c8f
Update gentoo-stage1 build to actually build portage. (Doesn't install a tree yet.)
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
19 wget http://gentoo.osuosl.org/snapshots/portage-latest.tar.bz2 -O - | \ |
1202
75d179a52475
Bootstrapping gentoo portage tree. Download tarball, extract it, and emerge --sync. (Build rsync so emerge --sync works.)
Rob Landley <rob@landley.net>
parents:
1112
diff
changeset
|
20 tar xjC /usr |
1112
25607cc50c8f
Update gentoo-stage1 build to actually build portage. (Doesn't install a tree yet.)
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
21 if [ ! -d portage ] |
25607cc50c8f
Update gentoo-stage1 build to actually build portage. (Doesn't install a tree yet.)
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
22 then |
25607cc50c8f
Update gentoo-stage1 build to actually build portage. (Doesn't install a tree yet.)
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
23 echo "Failed to download portage-latest tarball." >&2 |
25607cc50c8f
Update gentoo-stage1 build to actually build portage. (Doesn't install a tree yet.)
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
24 exit 1 |
25607cc50c8f
Update gentoo-stage1 build to actually build portage. (Doesn't install a tree yet.)
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
25 fi |
25607cc50c8f
Update gentoo-stage1 build to actually build portage. (Doesn't install a tree yet.)
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
26 |
1202
75d179a52475
Bootstrapping gentoo portage tree. Download tarball, extract it, and emerge --sync. (Build rsync so emerge --sync works.)
Rob Landley <rob@landley.net>
parents:
1112
diff
changeset
|
27 if ! emerge.real --sync |
75d179a52475
Bootstrapping gentoo portage tree. Download tarball, extract it, and emerge --sync. (Build rsync so emerge --sync works.)
Rob Landley <rob@landley.net>
parents:
1112
diff
changeset
|
28 then |
75d179a52475
Bootstrapping gentoo portage tree. Download tarball, extract it, and emerge --sync. (Build rsync so emerge --sync works.)
Rob Landley <rob@landley.net>
parents:
1112
diff
changeset
|
29 echo "Sync failed" |
75d179a52475
Bootstrapping gentoo portage tree. Download tarball, extract it, and emerge --sync. (Build rsync so emerge --sync works.)
Rob Landley <rob@landley.net>
parents:
1112
diff
changeset
|
30 exit 1 |
75d179a52475
Bootstrapping gentoo portage tree. Download tarball, extract it, and emerge --sync. (Build rsync so emerge --sync works.)
Rob Landley <rob@landley.net>
parents:
1112
diff
changeset
|
31 fi |
1112
25607cc50c8f
Update gentoo-stage1 build to actually build portage. (Doesn't install a tree yet.)
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
32 |
25607cc50c8f
Update gentoo-stage1 build to actually build portage. (Doesn't install a tree yet.)
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
33 cd $(dirname $(readlink -f $(which emerge.real))) |
25607cc50c8f
Update gentoo-stage1 build to actually build portage. (Doesn't install a tree yet.)
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
34 mv emerge.real emerge |
25607cc50c8f
Update gentoo-stage1 build to actually build portage. (Doesn't install a tree yet.)
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
35 |
25607cc50c8f
Update gentoo-stage1 build to actually build portage. (Doesn't install a tree yet.)
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
36 echo "Portage tree initialized" |