Namespace SHA256SUMS file to distro/release/arch

Its possible other images will want to use the same filename

Change-Id: Iae393bfc71205d39e2bc6e12f5524824607d6101
This commit is contained in:
Clint Byrum 2013-02-27 20:23:13 -08:00
parent b2314243c6
commit cc4b23aafa

View File

@ -16,10 +16,10 @@ mkdir -p $IMG_PATH
# TODO: don't cache -current forever.
if [ ! -f $IMG_PATH/$BASE_IMAGE_FILE ] ; then
echo "Fetching Base Image"
wget $SHA256SUMS -O $IMG_PATH/SHA256SUMS.ubuntu.$RELEASE.$ARCH
wget $CLOUD_IMAGES/$RELEASE/current/$BASE_IMAGE_FILE -O $IMG_PATH/$BASE_IMAGE_FILE.tmp
wget $SHA256SUMS -O $IMG_PATH/SHA256SUMS
pushd $IMG_PATH
awk "/$BASE_IMAGE_FILE/ { print \$0 \".tmp\" }" SHA256SUMS | sha256sum --check -
awk "/$BASE_IMAGE_FILE/ { print \$0 \".tmp\" }" SHA256SUMS.ubuntu.$RELEASE.$ARCH | sha256sum --check -
popd
mv $IMG_PATH/$BASE_IMAGE_FILE.tmp $IMG_PATH/$BASE_IMAGE_FILE
fi