#!/bin/bash set -eu [ -n "$ARCH" ] [ -n "$TARGET_ROOT" ] if [ 'amd64' = "$ARCH" ] ; then ARCH="x86_64" fi if [ 'i386' = "$ARCH" ] ; then ARCH="i586" fi DIB_CLOUD_IMAGES=${DIB_CLOUD_IMAGES:-http://download.opensuse.org/repositories/Cloud:/Images/images/} DIB_RELEASE=${DIB_RELEASE:-13.1} # FIXME: Hard coded build numbers, versions, etc. BASE_IMAGE_NAME=${BASE_IMAGE_NAME:-openSUSE-$DIB_RELEASE-OpenStack-Guest.$ARCH} if [ -z "$DIB_OFFLINE" ] ; then # XXX: Try to extract the filename of the current built from the index # page. As there is one built available in the repo at a given time, this # should work. This is a tempoary workaround until the fix for # https://bugzilla.novell.com/show_bug.cgi?id=853882 is deployed echo "Looking up current built of Base Image ($BASE_IMAGE_NAME):" BASE_IMAGE_FILE=${BASE_IMAGE_FILE:-$(curl $DIB_CLOUD_IMAGES | \ sed -n "s/^.*\