kube-tarian / git-bridge

Use of legacy backtick SH-2006
Anti-pattern
Major
2 years ago2 years old
Use $(...) notation instead of legacy backticks ...
 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
Use $(...) notation instead of legacy backticks ...
 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
Use $(...) notation instead of legacy backticks ...
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
Use $(...) notation instead of legacy backticks ...
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).
Use $(...) notation instead of legacy backticks ...
364    # unset zforce zargs zbenchflags
365}
366
367[ "." = `dirname $0` ] && _main "$@"368