@@ -98,7 +98,7 @@ create)
9898 echo " Using dev license key from \$ COCKROACH_DEV_LICENSE"
9999 else
100100 echo -n " Enter your dev license key (if any): "
101- read COCKROACH_DEV_LICENSE
101+ read -r COCKROACH_DEV_LICENSE
102102 fi
103103
104104 gsuite_account_for_label=" $(
@@ -163,7 +163,7 @@ start)
163163 echo " Set GCEWORKER_START_SSH_COMMAND=mosh to use mosh instead"
164164 fi
165165 echo " ****************************************"
166- $0 ${GCEWORKER_START_SSH_COMMAND-ssh}
166+ $0 " ${GCEWORKER_START_SSH_COMMAND-ssh} "
167167 ;;
168168stop)
169169 read -r -p " This will stop the VM. Are you sure? [yes] " response
221221mosh)
222222 mosh --ssh " ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null" " $( user_domain_suffix) @${FQNAME} "
223223 ;;
224- gcloud)
225- gcloud " $@ "
226- ;;
227224get)
228225 rpath=" ${1} "
229226 # Check whether we have an absolute path like /foo, ~foo, or ~/foo.
@@ -253,56 +250,15 @@ put)
253250 gcloud compute scp --recurse " ${lpaths[@]} " " ${to} "
254251 ;;
255252ip)
256- echo " $( get_ip) "
257- ;;
258- sync)
259- if ! hash unison 2> /dev/null; then
260- echo ' unison not found (on macOS, run `brew install unison`)' >&2
261- exit 1
262- fi
263- if ! hash unison-fsmonitor 2> /dev/null; then
264- echo ' unison-fsmonitor not installed (on macOS, run `brew install eugenmayer/dockersync/unox`)'
265- exit 1
266- fi
267- if (( $# == 0 )) ; then
268- host=. # Sync the Cockroach repo by default.
269- worker=go/src/github.com/cockroachdb/cockroach
270- elif (( $# == 2 )) ; then
271- host=$1
272- worker=$2
273- else
274- echo " usage: $0 mount [HOST-PATH WORKER-PATH]" >&2
275- exit 1
276- fi
277- read -p " Warning: sync will overwrite files on the GCE worker with your local copy. Continue? (Y/n) "
278- if [[ " $REPLY " && " $REPLY " != [Yy] ]]; then
279- exit 1
280- fi
281- tmpfile=$( mktemp)
282- trap ' rm -f ${tmpfile}' EXIT
283- unison " $host " " ssh://${NAME} .${CLOUDSDK_COMPUTE_ZONE} .${CLOUDSDK_CORE_PROJECT} /$worker " \
284- -sshargs " -F ${tmpfile} " -auto -prefer " $host " -repeat watch \
285- -ignore ' Path .localcluster.certs*' \
286- -ignore ' Path .git' \
287- -ignore ' Path _bazel*' \
288- -ignore ' Path bazel-out*' \
289- -ignore ' Path bin*' \
290- -ignore ' Path build/builder_home' \
291- -ignore ' Path pkg/sql/parser/gen' \
292- -ignore ' Path pkg/ui/node_modules' \
293- -ignore ' Path pkg/ui/.cache-loader' \
294- -ignore ' Path cockroach-data' \
295- -ignore ' Name *.d' \
296- -ignore ' Name *.o' \
297- -ignore ' Name zcgo_flags*.go'
253+ get_ip
298254 ;;
299255vscode)
300256 start_and_wait " ${NAME} "
301- HOST=$( gcloud_compute_ssh --dry-run ${ NAME} | awk ' {print $NF}' )
302- code --wait --remote ssh-remote+$HOST " $@ "
257+ HOST=" $( gcloud_compute_ssh --dry-run " $ NAME" | awk ' {print $NF}' ) "
258+ code --wait --remote ssh-remote+" $HOST " " $@ "
303259 ;;
304260status)
305- gcloud compute instances describe ${ NAME} --format=" table(name,status,lastStartTimestamp,lastStopTimestamp)"
261+ gcloud compute instances describe " $ NAME" --format=" table(name,status,lastStartTimestamp,lastStopTimestamp)"
306262 ;;
307263update-hosts)
308264 NEW_IP=" $( get_ip) "
0 commit comments