# extract uuid property from json and show url of the status page
function logStatusUrl {
localprop="uuid"
localtemp=`echo$json| sed 's/\\\\\//\//g'| sed 's/[{}]//g'| awk -v k="text"'{n=split($0,a,","); for (i=1; i<=n; i++) print a[i]}'| sed 's/\"\:\"/\|/g'| sed 's/[\,]/ /g'| sed 's/\"//g'| grep -w $prop`
echolog "Check status of $name at: https://typesafe.com/activator/template/status/${temp##*|}"
}
# print usage info
function usage {
cat <<EOM
Usage: ${script_name}[options] VERSION
-h | --help Print this usage message
-u | --user USER typesafe.com user name
-p | --password PASSWORD typesafe.com user password
EOM
}
# process options and set flags
while true;do
case"$1" in
-h | --help ) usage;exit1;;
-u | --user )user=$2;shift2;;
-p | --password )pwd=$2;shift2;;
* )break;;
esac
done
if[$# !="1"];then
usage
fail "A release version must be specified"
fi
if[ -z "$user"];then
usage
fail "user must be specified"
fi
if[ -z "$pwd"];then
usage
fail "password must be specified"
fi
declare -r version=$1
# check for a curl command
type -P curl &> /dev/null || fail "curl command not found"