[build] Refined test_function function
This commit is contained in:
parent
9829bc32d0
commit
b179b90d83
1 changed files with 3 additions and 6 deletions
9
build.sh
9
build.sh
|
@ -4,12 +4,9 @@ EXEC=dam
|
|||
|
||||
test_function() {
|
||||
functionList=(${@})
|
||||
source src/env
|
||||
for function in ${functionList[@]}; do
|
||||
echo -e "#!/bin/bash\n" > .test.sh
|
||||
awk '!/^ *#/ && NF' src/env >> .test.sh
|
||||
awk '!/^ *#/ && NF' ${function} >> .test.sh
|
||||
bash .test.sh
|
||||
rm .test.sh
|
||||
bash ${function}
|
||||
done
|
||||
}
|
||||
|
||||
|
@ -43,7 +40,7 @@ gen_parser() {
|
|||
awk '!/^ *#/ && NF' src/parser
|
||||
}
|
||||
|
||||
test_function $(find src/ -type f -not -name env -not -name parser) >> ${EXEC}
|
||||
test_function $(find src/ -type f -not -name env -not -name parser)
|
||||
|
||||
gen_env > ${EXEC}
|
||||
gen_help >> ${EXEC}
|
||||
|
|
Loading…
Reference in a new issue