diff options
author | Sébastien Helleu <flashcode@flashtux.org> | 2019-11-28 21:25:47 +0100 |
---|---|---|
committer | Sébastien Helleu <flashcode@flashtux.org> | 2019-11-28 21:25:47 +0100 |
commit | a727516e0d57d80f0d4aa6add1ff6607e3d9b676 (patch) | |
tree | e218619ce2843964072f7b85303ce0c5edb6bbda /tools | |
parent | c0e48b03709e8503bf2bb31cadaddb1507f51821 (diff) | |
download | weechat-a727516e0d57d80f0d4aa6add1ff6607e3d9b676.zip |
core: run command and check return code on same line in tools scripts
Diffstat (limited to 'tools')
-rwxr-xr-x | tools/build-debian.sh | 3 | ||||
-rwxr-xr-x | tools/build-test.sh | 3 |
2 files changed, 2 insertions, 4 deletions
diff --git a/tools/build-debian.sh b/tools/build-debian.sh index 3cca2ac55..c1d503e8c 100755 --- a/tools/build-debian.sh +++ b/tools/build-debian.sh @@ -111,8 +111,7 @@ test_patches () PATCHES_ERROR=0 for file in "${ROOT_DIR}"/tools/debian/patches/*.patch; do echo "=== Testing patch ${file} ===" - git apply --check "${file}" - if [ $? -eq 0 ]; then + if git apply --check "${file}"; then PATCHES_OK=$((PATCHES_OK+1)) else PATCHES_ERROR=$((PATCHES_ERROR+1)) diff --git a/tools/build-test.sh b/tools/build-test.sh index 270d3c50a..551195a9b 100755 --- a/tools/build-test.sh +++ b/tools/build-test.sh @@ -71,8 +71,7 @@ if [ "$BUILDTOOL" = "cmake" ]; then run "cmake .. -DENABLE_MAN=ON -DENABLE_DOC=ON -DENABLE_TESTS=ON ${BUILDARGS}" run "make VERBOSE=1 -j$(nproc)" run "sudo make install" - run "ctest -V" - if [ $? -eq 0 ] && [ "$CODECOVERAGE" = "1" ]; then + if run "ctest -V" && [ "$CODECOVERAGE" = "1" ]; then run "lcov --directory . --capture --output-file coverage.info" run "lcov --remove coverage.info '/usr/*' --output-file coverage.info" run "lcov --list coverage.info" |