From cb9a85847c51ff4ee751d59a138a059501ed3ccb Mon Sep 17 00:00:00 2001 From: Xavier Delaruelle Date: Mon, 21 Sep 2026 07:54:37 +0200 Subject: [PATCH] install/script: fix warnings reported by ShellCheck 0.11 ShellCheck 0.11 flags reading $? after a bare test command in configure and the += status accumulation in script/mt, which appends a string instead of adding a number. Turn the former into an explicit if/else and the latter into a plain assignment. Assisted-by: Claude:claude-fable-5-1 Signed-off-by: Xavier Delaruelle --- configure | 7 +++++-- script/mt | 3 +-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/configure b/configure index 3912e2521..dc3d858b2 100755 --- a/configure +++ b/configure @@ -1074,8 +1074,11 @@ fi export GIT_DIR="${progdir}/.git" export GIT_WORK_TREE="${progdir}" -test -e "${GIT_DIR}" -work_from_git_repo=$? +if test -e "${GIT_DIR}"; then + work_from_git_repo=0 +else + work_from_git_repo=1 +fi # if we install from git repository, must have git to fetch current release number if [ $work_from_git_repo -eq 0 ]; then diff --git a/script/mt b/script/mt index 59aa92e22..90c5df633 100755 --- a/script/mt +++ b/script/mt @@ -246,9 +246,8 @@ if [ -t 1 ]; then fi # highlight failed tests -retreview=0 review_log -retreview+=$? +retreview=$? # testsuite ok but mtreview failed to run if [ $ret -eq 0 ] && [ $retreview -ne 0 ]; then