Assume -y
This commit is contained in:
parent
dcb30a8489
commit
506a81e8cc
|
@ -98,7 +98,7 @@ fi
|
|||
set -x
|
||||
|
||||
echo --- gce.sh delete
|
||||
time net/gce.sh delete -p "$netName" -y
|
||||
time net/gce.sh delete -p "$netName"
|
||||
if $delete; then
|
||||
exit 0
|
||||
fi
|
||||
|
|
10
net/gce.sh
10
net/gce.sh
|
@ -23,7 +23,6 @@ imageName="ubuntu-16-04-cuda-9-2-new"
|
|||
publicNetwork=false
|
||||
zone="us-west1-b"
|
||||
leaderAddress=
|
||||
yes=false
|
||||
|
||||
usage() {
|
||||
exitcode=0
|
||||
|
@ -57,7 +56,7 @@ Configure a GCE-based testnet
|
|||
none
|
||||
|
||||
delete-specific options:
|
||||
-y - Skip delete confirmation, assume yes
|
||||
none
|
||||
|
||||
EOF
|
||||
exit $exitcode
|
||||
|
@ -69,7 +68,7 @@ command=$1
|
|||
shift
|
||||
[[ $command = create || $command = config || $command = delete ]] || usage "Invalid command: $command"
|
||||
|
||||
while getopts "h?p:Pi:n:c:z:ga:y" opt; do
|
||||
while getopts "h?p:Pi:n:c:z:ga:" opt; do
|
||||
case $opt in
|
||||
h | \?)
|
||||
usage
|
||||
|
@ -84,9 +83,6 @@ while getopts "h?p:Pi:n:c:z:ga:y" opt; do
|
|||
i)
|
||||
imageName=$OPTARG
|
||||
;;
|
||||
y)
|
||||
yes=true
|
||||
;;
|
||||
n)
|
||||
validatorNodeCount=$OPTARG
|
||||
;;
|
||||
|
@ -197,7 +193,7 @@ delete)
|
|||
if [[ ${#instances[@]} -eq 0 ]]; then
|
||||
echo "No instances found matching '$filter'"
|
||||
else
|
||||
gcloud_DeleteInstances "$yes"
|
||||
gcloud_DeleteInstances true
|
||||
fi
|
||||
done
|
||||
rm -f "$configFile"
|
||||
|
|
Loading…
Reference in New Issue