minor fix for handling unsupported opt in script
This commit is contained in:
parent
c04438be4b
commit
69b47915b1
|
@ -30,9 +30,9 @@ useEnv=false
|
||||||
delete=false
|
delete=false
|
||||||
createWithoutConfig=false
|
createWithoutConfig=false
|
||||||
host="https://internal-metrics.solana.com:8086"
|
host="https://internal-metrics.solana.com:8086"
|
||||||
while getopts "hdec:" opt; do
|
while getopts ":hdec:" opt; do
|
||||||
case $opt in
|
case $opt in
|
||||||
h|\?)
|
h)
|
||||||
usage
|
usage
|
||||||
exit 0
|
exit 0
|
||||||
;;
|
;;
|
||||||
|
@ -47,7 +47,7 @@ while getopts "hdec:" opt; do
|
||||||
useEnv=true
|
useEnv=true
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
usage "unhandled option: $opt"
|
usage "unhandled option: $OPTARG"
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
|
@ -77,7 +77,7 @@ else
|
||||||
"$host/query?u=${username}&p=${password}" \
|
"$host/query?u=${username}&p=${password}" \
|
||||||
--data-urlencode "q=$*"
|
--data-urlencode "q=$*"
|
||||||
}
|
}
|
||||||
|
|
||||||
query "DROP DATABASE \"$netBasename\""
|
query "DROP DATABASE \"$netBasename\""
|
||||||
! $delete || exit 0
|
! $delete || exit 0
|
||||||
query "CREATE DATABASE \"$netBasename\""
|
query "CREATE DATABASE \"$netBasename\""
|
||||||
|
|
Loading…
Reference in New Issue