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