Skip to content

Commit

Permalink
Merge separation of build and cache from scgilardi/master
Browse files Browse the repository at this point in the history
  • Loading branch information
scgilardi authored and Carl Johan Crafoord committed May 28, 2012
1 parent cf98eb3 commit eec4261
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions build.sh
Expand Up @@ -11,6 +11,7 @@ BOX="ubuntu-precise-64"

# location, location, location
FOLDER_BASE=`pwd`
FOLDER_ISO_CACHE="${FOLDER_BASE}/iso-cache"
FOLDER_BUILD="${FOLDER_BASE}/build"
FOLDER_VBOX="${FOLDER_BUILD}/vbox"
FOLDER_ISO="${FOLDER_BUILD}/iso"
Expand All @@ -34,16 +35,20 @@ mkdir -p "${FOLDER_ISO_INITRD}"

ISO_URL="http://releases.ubuntu.com/precise/ubuntu-12.04-alternate-amd64.iso"
ISO_FILENAME="${FOLDER_ISO}/`basename ${ISO_URL}`"
ISO_CACHE_FILENAME="${FOLDER_ISO_CACHE}/`basename ${ISO_URL}`"
ISO_MD5="9fcc322536575dda5879c279f0b142d7"
INITRD_FILENAME="${FOLDER_ISO}/initrd.gz"

ISO_GUESTADDITIONS="/Applications/VirtualBox.app/Contents/MacOS/VBoxGuestAdditions.iso"

# download the installation disk if you haven't already or it is corrupted somehow
echo "Downloading ubuntu-12.04-alternate-amd64.iso ..."
if [ ! -e "${ISO_FILENAME}" ]
then
curl --output "${ISO_FILENAME}" -L "${ISO_URL}"
if [ ! -e "${ISO_FILENAME}" ]; then
if [ -e "${ISO_CACHE_FILENAME}" ]; then
cp "${ISO_CACHE_FILENAME}" "${ISO_FILENAME}"
else
curl --output "${ISO_FILENAME}" -L "${ISO_URL}"
fi
else
# make sure download is right...
ISO_HASH=`md5 -q "${ISO_FILENAME}"`
Expand Down

0 comments on commit eec4261

Please sign in to comment.