Mercurial > hg > aboriginal
annotate sources/native-builds/gentoo-stage1-files/emerge_wrapper.sh @ 1112:25607cc50c8f
Update gentoo-stage1 build to actually build portage. (Doesn't install a tree yet.)
author | Rob Landley <rob@landley.net> |
---|---|
date | Sun, 13 Jun 2010 22:55:53 -0500 |
parents | |
children | 75d179a52475 |
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..." |
25607cc50c8f
Update gentoo-stage1 build to actually build portage. (Doesn't install a tree yet.)
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
16 cd /usr |
25607cc50c8f
Update gentoo-stage1 build to actually build portage. (Doesn't install a tree yet.)
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
17 wget http://gentoo.osuosl.org/snapshots/portage-latest.tar.bz2 -O - | \ |
25607cc50c8f
Update gentoo-stage1 build to actually build portage. (Doesn't install a tree yet.)
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
18 tar xjC /usr/portage |
25607cc50c8f
Update gentoo-stage1 build to actually build portage. (Doesn't install a tree yet.)
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
19 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
|
20 then |
25607cc50c8f
Update gentoo-stage1 build to actually build portage. (Doesn't install a tree yet.)
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
21 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
|
22 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
|
23 fi |
25607cc50c8f
Update gentoo-stage1 build to actually build portage. (Doesn't install a tree yet.)
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
24 |
25607cc50c8f
Update gentoo-stage1 build to actually build portage. (Doesn't install a tree yet.)
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
25 emerge.real --sync |
25607cc50c8f
Update gentoo-stage1 build to actually build portage. (Doesn't install a tree yet.)
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
26 |
25607cc50c8f
Update gentoo-stage1 build to actually build portage. (Doesn't install a tree yet.)
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
27 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
|
28 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
|
29 |
25607cc50c8f
Update gentoo-stage1 build to actually build portage. (Doesn't install a tree yet.)
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
30 echo "Portage tree initialized" |