Format shell scripts with shfmt.

All changes in this patch were performed automatically with `shfmt` with
configuration flags specified in `.pre-commit-config.yaml`.

In addition to fixing whitespace the roundtrip through shfmt's AST also
transforms command substitutions

    `cmd`
    # becomes
    $(cmd)

and some redirects

    >&2 echo "msg"
    # becomes
    echo >&2 "msg"
This commit is contained in:
Benjamin Bannier 2021-11-24 22:48:46 +01:00
parent e0b4659488
commit 1f388e3f40
34 changed files with 369 additions and 379 deletions

View file

@ -16,7 +16,7 @@ cd $test
grep -c '^namespace' $gen
mv $gen $build/
cd $build
ninja >& errs || echo build for $1 failed
ninja >&errs || echo build for $1 failed
export -n ZEEK_GEN_CPP
cd $test

View file

@ -15,7 +15,7 @@ cp $build/CPP-hashes.dat .
grep -c '^namespace' $gen
mv $gen $build
cd $build
ninja >& errs || echo build for $1 failed
ninja >&errs || echo build for $1 failed
export -n ZEEK_ADD_CPP
cd $test

View file

@ -15,4 +15,4 @@ echo >$gen
grep -c '^namespace' $gen
mv $gen $so
cd $build
ninja >& errs || echo test suite build failed
ninja >&errs || echo test suite build failed

View file

@ -13,7 +13,7 @@ cp $build/CPP-hashes.dat .
grep -c '^namespace' $gen
mv $gen $build/
cd $build
ninja >& errs || echo build for $1 failed
ninja >&errs || echo build for $1 failed
export -n ZEEK_ADD_CPP
cd $test