diff --git a/build.sh b/build.sh index c4b9093..be61664 100755 --- a/build.sh +++ b/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}