diff options
author | Fedja Beader <fedja@protonmail.ch> | 2023-09-10 15:58:24 +0200 |
---|---|---|
committer | Fedja Beader <fedja@protonmail.ch> | 2023-09-10 15:58:24 +0200 |
commit | 0a2d34be04d72b8982cc2cd488f7e6432d30b40b (patch) | |
tree | 8eca42bd37a93b9eae2200133dfd7ad47024ad09 /tools/ci/jobs/deheader2.sh | |
parent | 3f68449293de30d84e39fef761ca5a4734f99c32 (diff) | |
download | manaverse-0a2d34be04d72b8982cc2cd488f7e6432d30b40b.tar.gz manaverse-0a2d34be04d72b8982cc2cd488f7e6432d30b40b.tar.bz2 manaverse-0a2d34be04d72b8982cc2cd488f7e6432d30b40b.tar.xz manaverse-0a2d34be04d72b8982cc2cd488f7e6432d30b40b.zip |
trim useless uses of cat
Diffstat (limited to 'tools/ci/jobs/deheader2.sh')
-rwxr-xr-x | tools/ci/jobs/deheader2.sh | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/tools/ci/jobs/deheader2.sh b/tools/ci/jobs/deheader2.sh index 5862e555e..521f9266f 100755 --- a/tools/ci/jobs/deheader2.sh +++ b/tools/ci/jobs/deheader2.sh @@ -2,14 +2,12 @@ export LOGFILE2=logs/deheader2.log -export DATA=$(cat ${LOGFILE}) -if [[ -z "${DATA}" ]]; then +if [[ ! -s "$LOGFILE" ]]; then echo "Empty output. Probably wrong search flags." exit 1 fi -export DATA=$(grep "error:" ${LOGFILE}) -if [[ -n "${DATA}" ]]; then +if grep "error:" "$LOGFILE"; then echo "Compilation error found" exit 1 fi @@ -31,9 +29,9 @@ grep "deheader:" "${LOGFILE}" \ -e "deheader: remove <climits> from ./src/units.cpp" \ > "${LOGFILE2}" -export DATA=$(cat ${LOGFILE2}) -if [[ -n "${DATA}" ]]; then - echo "Wrong include files found" - echo ${DATA} + +if [[ -s "$LOGFILE2" ]]; then + echo "Wrong include files found:" + cat "$LOGFILE2" exit 1 fi |