aboutsummaryrefslogtreecommitdiffstats
path: root/bootstrap/fetch-ubuntulive.sh
diff options
context:
space:
mode:
authorJoachim Tingvold <joachim@tingvold.com>2015-03-31 05:09:33 +0200
committerJoachim Tingvold <joachim@tingvold.com>2015-03-31 05:09:33 +0200
commit381e194162092e6ca6d1da2248a41af8b4f7208d (patch)
tree224c1f7003a1ff3f9a5f4d844c1bea3c86f88958 /bootstrap/fetch-ubuntulive.sh
parent191df1949e2e05eb20b49d5cb31afc7a1f70da91 (diff)
parente3d7c5cc86fedb458d9b091ca12245c01e7f285d (diff)
Merge branch 'master' of github.com:tech-server/tgmanage
Diffstat (limited to 'bootstrap/fetch-ubuntulive.sh')
-rwxr-xr-xbootstrap/fetch-ubuntulive.sh21
1 files changed, 21 insertions, 0 deletions
diff --git a/bootstrap/fetch-ubuntulive.sh b/bootstrap/fetch-ubuntulive.sh
new file mode 100755
index 0000000..44d5d62
--- /dev/null
+++ b/bootstrap/fetch-ubuntulive.sh
@@ -0,0 +1,21 @@
+#!/bin/bash
+INSTALLER_DEST=$1
+UBUNTU_MIRROR=http://no.releases.ubuntu.com/
+UBUNTU_VERSION=desktop
+UBUNTU_DIST="14.10"
+UBUNTU_ARCH="i386 amd64"
+TMP_MNT="/mnt/tmp"
+
+mkdir -p ${TMP_MNT}
+for DIST in ${UBUNTU_DIST}
+do
+ for ARCH in ${UBUNTU_ARCH}
+ do
+ mkdir -p ${INSTALLER_DEST}/${UBUNTU_DIST}/${ARCH}
+ wget ${UBUNTU_MIRROR}/${DIST}/ubuntu-${DIST}-${UBUNTU_VERSION}-${ARCH}.iso -O /tmp/ubuntu-${DIST}-${UBUNTU_VERSION}-${ARCH}.iso &&
+ mount -o loop "/tmp/ubuntu-${DIST}-${UBUNTU_VERSION}-${ARCH}.iso" ${TMP_MNT}/ &&
+ cp -Rv ${TMP_MNT}/* ${INSTALLER_DEST}/${DIST}/${ARCH}/ &&
+ umount ${TMP_MNT}/
+ done
+ rmdir ${TMP_MNT}/
+done