...
79 if ! [[ "${zforce}" || $(_ng "fast-path.generated.go") || $(_ng "gen-helper.generated.go") || $(_ng "gen.generated.go") ]]; then return 0; fi
80
81 if [ "${zbak}" ]; then
82 _zts=`date '+%m%d%Y_%H%M%S'` 83 _gg=".generated.go"
84 [ -e "gen-helper${_gg}" ] && mv gen-helper${_gg} gen-helper${_gg}__${_zts}.bak
85 [ -e "fast-path${_gg}" ] && mv fast-path${_gg} fast-path${_gg}__${_zts}.bak
...
59_ng() {
60 local a="$1"
61 if [[ ! -e "$a" ]]; then echo 1; return; fi
62 for i in `ls -1 *.go.tmpl gen.go values_test.go` 63 do
64 if [[ "$a" -ot "$i" ]]; then echo 1; return; fi
65 done
...
274 if [[ -z "${GOROOT// }" || -z "${GOROOT_BOOTSTRAP// }" ]]; then return 1; fi
275 # (cd $GOROOT && git checkout -f master && git pull && git reset --hard)
276 (cd $GOROOT && git pull)
277 local f=`pwd`/make.release.out278 cat > $f <<EOF
279========== `date` ===========
280EOF
...
276 (cd $GOROOT && git pull)
277 local f=`pwd`/make.release.out
278 cat > $f <<EOF
279========== `date` ===========280EOF
281 # # go 1.6 and below kept giving memory errors on Mac OS X during SDK build or go run execution,
282 # # that is fine, as we only explicitly test the last 3 releases and tip (2 years).
...
364 # unset zforce zargs zbenchflags
365}
366
367[ "." = `dirname $0` ] && _main "$@"368
Consider using the $(...)
notation instead.
Backtick command substitution \
...`` is legacy syntax with several issues.
* It has a series of undefined behaviors related to quoting in POSIX.
* It imposes a custom escaping mode with surprising results.
* It's exceptionally hard to nest.
$(...)
command substitution has none of these problems, and is therefore strongly encouraged.
echo "You are running on `uname`"
echo "You are running on $(uname)"
Read more about it here:
- BashFq: Why is $(...)
preferred over \
...`` (backticks)?.