Skip to content

Commit

Permalink
minor fix for handling unsupported opt in script
Browse files Browse the repository at this point in the history
  • Loading branch information
HaoranYi authored and mvines committed Feb 12, 2022
1 parent c04438b commit 69b4791
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions net/init-metrics.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@ useEnv=false
delete=false
createWithoutConfig=false
host="https://internal-metrics.solana.com:8086"
while getopts "hdec:" opt; do
while getopts ":hdec:" opt; do
case $opt in
h|\?)
h)
usage
exit 0
;;
Expand All @@ -47,7 +47,7 @@ while getopts "hdec:" opt; do
useEnv=true
;;
*)
usage "unhandled option: $opt"
usage "unhandled option: $OPTARG"
;;
esac
done
Expand Down Expand Up @@ -77,7 +77,7 @@ else
"$host/query?u=${username}&p=${password}" \
--data-urlencode "q=$*"
}

query "DROP DATABASE \"$netBasename\""
! $delete || exit 0
query "CREATE DATABASE \"$netBasename\""
Expand Down

0 comments on commit 69b4791

Please sign in to comment.