Few changes to get_uec_image.sh:

Fixed typo in usage message

Fixed usage message to represent actual code

Set default minimum image size to 2000MB from 2000*BS

fixed bug not creating directory for downoladed files

Change-Id: Id736ac7984f88e61b685569b6ba5e9158bea5889

added percise and quantal

Change-Id: Id9cb74dded044ec998700c1b456a8077f76c96e8
This commit is contained in:
dmitriybudnik 2012-10-21 02:00:07 +03:00
parent 308beccc24
commit 0c49539288

View File

@ -5,7 +5,7 @@
# Download and prepare Ubuntu UEC images # Download and prepare Ubuntu UEC images
CACHEDIR=${CACHEDIR:-/opt/stack/cache} CACHEDIR=${CACHEDIR:-/opt/stack/cache}
ROOTSIZE=${ROOTSIZE:-2000} ROOTSIZE=${ROOTSIZE:-2000M}
# Keep track of the current directory # Keep track of the current directory
TOOLS_DIR=$(cd $(dirname "$0") && pwd) TOOLS_DIR=$(cd $(dirname "$0") && pwd)
@ -24,7 +24,7 @@ usage() {
echo "$0 [-r rootsize] release imagefile [kernel]" echo "$0 [-r rootsize] release imagefile [kernel]"
echo "" echo ""
echo "-r size - root fs size (min 2000MB)" echo "-r size - root fs size (min 2000MB)"
echo "release - Ubuntu release: jaunty - oneric" echo "release - Ubuntu release: lucid - quantal"
echo "imagefile - output image file" echo "imagefile - output image file"
echo "kernel - output kernel" echo "kernel - output kernel"
exit 1 exit 1
@ -64,6 +64,8 @@ IMG_FILE_TMP=`mktemp $IMG_FILE.XXXXXX`
KERNEL=$3 KERNEL=$3
case $DIST_NAME in case $DIST_NAME in
quantal) ;;
percise) ;;
oneiric) ;; oneiric) ;;
natty) ;; natty) ;;
maverick) ;; maverick) ;;
@ -90,7 +92,7 @@ fi
# Get the UEC image # Get the UEC image
UEC_NAME=$DIST_NAME-server-cloudimg-amd64 UEC_NAME=$DIST_NAME-server-cloudimg-amd64
if [ ! -d $CACHEDIR ]; then if [ ! -d $CACHEDIR/$DIST_NAME ]; then
mkdir -p $CACHEDIR/$DIST_NAME mkdir -p $CACHEDIR/$DIST_NAME
fi fi
if [ ! -e $CACHEDIR/$DIST_NAME/$UEC_NAME.tar.gz ]; then if [ ! -e $CACHEDIR/$DIST_NAME/$UEC_NAME.tar.gz ]; then