mirror of
https://github.com/zeek/zeek.git
synced 2025-10-06 08:38:20 +00:00
format shell scripts per style guide
This commit is contained in:
parent
5c3cc4fba8
commit
a21d14fbd2
5 changed files with 28 additions and 13 deletions
|
@ -3,6 +3,10 @@ This is a collection of scripts to support maintenance of -O gen-C++
|
|||
suite, and are currently tailored for the lead maintainer's own environment.
|
||||
The scripts all assume you're running them from build/ .
|
||||
|
||||
If you make changes to the scripts, format them using
|
||||
|
||||
shfmt -w -i 4 -ci *.sh
|
||||
|
||||
The maintenance workflow:
|
||||
|
||||
1. Update this timestamp, so this file will be changed and you'll remember
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
#! /bin/sh
|
||||
|
||||
out=out.`echo $1 | sed 's,\.\./,,;s,/,#,g'`
|
||||
out=out.$(echo $1 | sed 's,\.\./,,;s,/,#,g')
|
||||
|
||||
(/bin/echo -n $1" "
|
||||
(src/zeek -O gen-C++ --optimize-files=testing/btest --optimize-func="<global-stmts>" $1 >& /dev/null && echo "success") || echo "fail") >CPP-test/$out 2>&1
|
||||
(
|
||||
/bin/echo -n $1" "
|
||||
(src/zeek -O gen-C++ --optimize-files=testing/btest --optimize-func="<global-stmts>" $1 >&/dev/null && echo "success") || echo "fail"
|
||||
) >CPP-test/$out 2>&1
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#! /bin/sh
|
||||
|
||||
/bin/echo -n $1" "
|
||||
(src/zeek --parse-only $1 >& /dev/null && echo "success") || echo "fail"
|
||||
(src/zeek --parse-only $1 >&/dev/null && echo "success") || echo "fail"
|
||||
|
|
|
@ -1,21 +1,30 @@
|
|||
#! /bin/sh
|
||||
|
||||
rm -f CPP-gen.cc
|
||||
cp zeek.HOLD src/zeek || (echo Need to create clean zeek.HOLD; exit 1) || exit 1
|
||||
cp zeek.HOLD src/zeek || (
|
||||
echo Need to create clean zeek.HOLD
|
||||
exit 1
|
||||
) || exit 1
|
||||
|
||||
base=`echo $1 | sed 's,\.\./,,;s,/,#,g'`
|
||||
rel_test=`echo $1 | sed 's,.*testing/btest/,,'`
|
||||
base=$(echo $1 | sed 's,\.\./,,;s,/,#,g')
|
||||
rel_test=$(echo $1 | sed 's,.*testing/btest/,,')
|
||||
|
||||
export ZEEK_GEN_CPP=1
|
||||
export ZEEK_CPP_DIR=`pwd`
|
||||
export ZEEK_CPP_DIR=$(pwd)
|
||||
# export ZEEK_OPT_FUNCS="<global-stmts>"
|
||||
export ZEEK_OPT_FILES="testing/btest"
|
||||
|
||||
(cd ../testing/btest; ../../auxil/btest/btest $rel_test)
|
||||
(
|
||||
cd ../testing/btest
|
||||
../../auxil/btest/btest $rel_test
|
||||
)
|
||||
|
||||
# export -n ZEEK_GEN_CPP ZEEK_CPP_DIR ZEEK_OPT_FUNCS ZEEK_OPT_FILES
|
||||
export -n ZEEK_GEN_CPP ZEEK_CPP_DIR ZEEK_OPT_FILES
|
||||
|
||||
ninja
|
||||
|
||||
(cd ../testing/btest; ../../auxil/btest/btest -a cpp -d -f ../../build/CPP-test/diag.$base $rel_test)
|
||||
(
|
||||
cd ../testing/btest
|
||||
../../auxil/btest/btest -a cpp -d -f ../../build/CPP-test/diag.$base $rel_test
|
||||
)
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#! /bin/sh
|
||||
|
||||
find ../testing/btest -type f |
|
||||
egrep -v 'Baseline|\.tmp' |
|
||||
egrep '\.(zeek|test)$' |
|
||||
sort
|
||||
egrep -v 'Baseline|\.tmp' |
|
||||
egrep '\.(zeek|test)$' |
|
||||
sort
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue