some little improvments

pull/3/head
antoine.leveugle 2014-04-29 00:25:57 +02:00
parent fcf5e6f588
commit c3d7245a3b
1 changed files with 3 additions and 3 deletions

View File

@ -38,12 +38,12 @@ isTargetValid()
if [ $i == "$TARGET" ] if [ $i == "$TARGET" ]
then then
VALID=1 VALID=1
break
fi fi
done done
if [ $VALID -eq 0 ] if [ $VALID -eq 0 ]
then then
echo "then"
echo "Error: $TARGET is not a valid target, accepted values are: ${TARGETS[@]}" echo "Error: $TARGET is not a valid target, accepted values are: ${TARGETS[@]}"
echo echo
help help
@ -53,7 +53,7 @@ isTargetValid()
createApp() createApp()
{ {
echo "For which OVH API do you want to create a new API Application? (EU/CA)" echo "For which OVH API do you want to create a new API Application? ($( echo ${TARGETS[@]} | sed 's/\s/|/g' ))"
while [ -z "$NEXT" ] while [ -z "$NEXT" ]
do do
read NEXT read NEXT
@ -133,7 +133,7 @@ help()
echo " --url <url> : the API URL to call, for example /domains (default is /me)" echo " --url <url> : the API URL to call, for example /domains (default is /me)"
echo " --method <method> : the HTTP method to use, for example POST (default is GET)" echo " --method <method> : the HTTP method to use, for example POST (default is GET)"
echo " --data <JSON data> : the data body to send with the request" echo " --data <JSON data> : the data body to send with the request"
echo " --target <EU|CA> : the target API (default is EU)" echo " --target <$( echo ${TARGETS[@]} | sed 's/\s/|/g' )> : the target API (default is EU)"
echo " --init : to initialize the consumer key" echo " --init : to initialize the consumer key"
echo " --initApp : to initialize the API application" echo " --initApp : to initialize the API application"
echo echo