diff options
author | Andreas Baumann <mail@andreasbaumann.cc> | 2016-10-15 17:44:09 +0200 |
---|---|---|
committer | Andreas Baumann <mail@andreasbaumann.cc> | 2016-10-15 17:44:09 +0200 |
commit | 8882cd30f9f09cb7b0ba23aab8fd21133a1d9f22 (patch) | |
tree | e5df97f26a5a980b9686a4d32421dbf60e2a28ff | |
parent | 00d2b00749d3244fccf3442a10d71574e78c22e5 (diff) | |
download | biruda-8882cd30f9f09cb7b0ba23aab8fd21133a1d9f22.tar.gz biruda-8882cd30f9f09cb7b0ba23aab8fd21133a1d9f22.tar.bz2 |
more ubuntu
-rwxr-xr-x | examples/build_gold_image/build_ubuntu1510.sh | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/examples/build_gold_image/build_ubuntu1510.sh b/examples/build_gold_image/build_ubuntu1510.sh new file mode 100755 index 0000000..4ce5aa4 --- /dev/null +++ b/examples/build_gold_image/build_ubuntu1510.sh @@ -0,0 +1,44 @@ +#!/bin/sh + +# Ubuntu 14.04 + +export PATH=/bin:/sbin:/usr/bin:/usr/sbin:${PATH} + +ARCH=$1 + +if test "x$ARCH" = "x"; then + echo "One argument expected (architecture)" 1>&2 + exit 1 +fi + +case $ARCH in + i686) + PACKAGE_ARCH=i386 + ARCH_SWITCH=linux32 + ;; + + x86_64) + PACKAGE_ARCH=amd64 + ARCH_SWITCH= + ;; + + *) + echo "Unsupported architecture '$ARCH'" 1>&2 + exit 1 +esac + +CHROOT_DIR=ubuntu1404-${ARCH} + +rm -rf $CHROOT_DIR + +mkdir $CHROOT_DIR + +debootstrap --verbose --arch=${PACKAGE_ARCH} --variant=minbase trusty $CHROOT_DIR http://ch.archive.ubuntu.com/ubuntu/ + +${ARCH_SWITCH} chroot ${CHROOT_DIR} apt-key update +${ARCH_SWITCH} chroot ${CHROOT_DIR} apt-get update + +cat >> $CHROOT_DIR/root/.bash_profile <<EOF +export PATH=\$PATH:/usr/sbin:/usr/bin:/sbin:/bin +export PS1='[ubuntu1404:\u@\h \W]\$ ' +EOF |