diff options
Diffstat (limited to 'create_image.sh')
-rwxr-xr-x | create_image.sh | 21 |
1 files changed, 13 insertions, 8 deletions
diff --git a/create_image.sh b/create_image.sh index 64289f9..d3025db 100755 --- a/create_image.sh +++ b/create_image.sh @@ -14,6 +14,7 @@ HOSTNAME="gentoo" ROOT_PASSWORD="g3nt00" DEFAULT_USERNAME="gentoo" DEFAULT_PASSWORD="g3nt00" +USE_FLAGS="-qt4 -kde X dbus gtk gnome hal gdu extras device-mapper policykit static-libs" LOG_FILE="`pwd`/log.txt" STAGE3_URL="http://distfiles.gentoo.org/releases/x86/current-stage3/stage3-i486-20110607.tar.bz2" @@ -89,20 +90,24 @@ cd rootfs # Setup Gentoo -echo "Downloading Stage 3" -wget ${STAGE3_URL} -O ../stage3.tar.bz2 &>> ${LOG_FILE} +if [ ! -f ../stage3.tar.bz2 ]; +then + echo "Downloading Stage 3" + wget ${STAGE3_URL} -O ../stage3.tar.bz2 &>> ${LOG_FILE} +fi echo "Extracting Stage 3" tar jvxf ../stage3.tar.bz2 &>> ${LOG_FILE} -rm stage3.tar.bz2 -echo "Downloading Portage snapshot" -cd usr -wget ${PORTAGE_URL} -O ../../portage-latest.tar.bz2 &>> ${LOG_FILE} +if [ ! -f ../portage-latest.tar.bz2 ]; +then + echo "Downloading Portage snapshot" + wget ${PORTAGE_URL} -O ../portage-latest.tar.bz2 &>> ${LOG_FILE} +fi echo "Extracting Portage snapshot" +cd usr tar jvxf ../../portage-latest.tar.bz2 &>> ${LOG_FILE} -rm portage-latest.tar.bz2 echo "Setting up chroot" cd .. @@ -117,7 +122,7 @@ echo 'FEATURES="parallel-fetch userfetch userpriv getbinpkg"' >> etc/make.conf mkdir -p usr/portage/packages echo "Setting up make.conf" -echo 'USE="-qt4 -kde X dbus gtk gnome hal gdu extras device-mapper policykit static-libs"' >> etc/make.conf +echo 'USE="${USE_FLAGS}"' >> etc/make.conf #echo 'INPUT_DEVICES="virtualbox evdev"' >> etc/make.conf #echo 'VIDEO_CARDS="virtualbox"' >> etc/make.conf |