94f07c5962
Have the fedora element use the common steps in the redhat-common element. Change-Id: Ic71b11c03b5c3868cc9e82e049f2700c1b67263a
31 lines
919 B
Bash
Executable file
31 lines
919 B
Bash
Executable file
#!/bin/bash
|
|
|
|
set -eu
|
|
|
|
[ -n "$ARCH" ]
|
|
[ -n "$TARGET_ROOT" ]
|
|
|
|
if [ 'amd64' = "$ARCH" ] ; then
|
|
ARCH="x86_64"
|
|
fi
|
|
|
|
DIB_LOCAL_IMAGE=${DIB_LOCAL_IMAGE:-""}
|
|
|
|
if [ -n "$DIB_LOCAL_IMAGE" ]; then
|
|
IMAGE_LOCATION=$DIB_LOCAL_IMAGE
|
|
# No need to copy a local image into the cache directory, so just specify
|
|
# the cached path as the original path.
|
|
CACHED_IMAGE=$IMAGE_LOCATION
|
|
BASE_IMAGE_FILE=`basename $DIB_LOCAL_IMAGE`
|
|
BASE_IMAGE_TAR=$BASE_IMAGE_FILE.tgz
|
|
else
|
|
DIB_RELEASE=${DIB_RELEASE:-20}
|
|
DIB_CLOUD_IMAGES=${DIB_CLOUD_IMAGES:-http://cloud.fedoraproject.org}
|
|
BASE_IMAGE_FILE=${BASE_IMAGE_FILE:-fedora-$DIB_RELEASE.$ARCH.qcow2}
|
|
BASE_IMAGE_TAR=$DIB_RELEASE-Cloud-$ARCH-$DIB_RELEASE.tgz
|
|
IMAGE_LOCATION=$DIB_CLOUD_IMAGES/$BASE_IMAGE_FILE
|
|
CACHED_IMAGE=$DIB_IMAGE_CACHE/$BASE_IMAGE_FILE
|
|
|
|
fi
|
|
|
|
$TMP_HOOKS_PATH/bin/extract-image $BASE_IMAGE_FILE $BASE_IMAGE_TAR $IMAGE_LOCATION $CACHED_IMAGE
|