comparison images/gentoo-bootstrap/mnt/files/emerge_wrapper.sh @ 0:bcd2e358d57f

Start by copying the existing control image building infrastructure from Aboriginal Linux, and shuffling the layout around a bit.
author Rob Landley <rob@landley.net>
date Sun, 03 Jul 2011 17:23:26 -0500
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:bcd2e358d57f
1 #!/bin/bash
2
3 if [ "$1" != "--sync" ]
4 then
5 echo 'No portage tree, run "emerge --sync".' >&2
6 exit 1
7 fi
8
9 if [ "$(id -u)" -ne 0 ]
10 then
11 echo "You are not root." >&2
12 exit 1
13 fi
14
15 echo "Downloading portage tree..."
16 mkdir -p /var/log /usr/portage &&
17 cd /usr &&
18 #wget http://127.0.0.1/aboriginal/mirror/portage-latest.tar.bz2 -O - | \
19 wget http://gentoo.osuosl.org/snapshots/portage-latest.tar.bz2 -O - | \
20 tar xjC /usr
21 if [ ! -d portage ]
22 then
23 echo "Failed to download portage-latest tarball." >&2
24 exit 1
25 fi
26
27 if ! emerge.real --sync
28 then
29 echo "Sync failed"
30 exit 1
31 fi
32
33 cd $(dirname $(readlink -f $(which emerge.real)))
34 mv emerge.real emerge
35
36 echo "Portage tree initialized"