From 27957b76186707575ae38f5fc515629c40cbfaaa Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Sat, 23 Jul 2022 13:31:20 +0200 Subject: Fix a couple of ShellCheck warnings. * MODULES.html.sh (sed_escape_slash): Remove unused variable. * build-aux/bootstrap: Avoid computed printf format strings. * build-aux/do-release-commit-and-tag: Likewise. * build-aux/gendocs.sh: Likewise. * build-aux/declared.sh: Fix "unrecognized option" message. * gnulib-tool (supplied_opts): Remove unused variable. (--single-con): Remove redundant option recognition. * tests/test-parse-duration.sh (nl): Remove unused variable. * tests/test-update-copyright.sh: Use double-quotes instead of single-quotes. --- build-aux/do-release-commit-and-tag | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'build-aux/do-release-commit-and-tag') diff --git a/build-aux/do-release-commit-and-tag b/build-aux/do-release-commit-and-tag index 493821a3f5..c8f7a53e05 100755 --- a/build-aux/do-release-commit-and-tag +++ b/build-aux/do-release-commit-and-tag @@ -125,7 +125,7 @@ prev_ver=$(cat .prev-version) \ || die 'failed to determine previous version number from .prev-version' # Verify that $ver is sensible (> .prev-version). -case $(printf "$prev_ver\n$ver\n"|sort -V -u|tr '\n' ':') in +case $(printf "%s\n%s\n" "$prev_ver" "$ver"|sort -V -u|tr '\n' ':') in "$prev_ver:$ver:") ;; *) die "invalid version: $ver (<= $prev_ver)";; esac @@ -165,7 +165,7 @@ perl -MPOSIX -ni -e 'my $today = strftime "%F", localtime time;' \ -e 'print $.==3 ? "$pfx $ver ($today) [$type]\n" : $_' \ NEWS || die 'failed to update NEWS' -printf "version $ver\n\n* NEWS: Record release date.\n" \ +printf "version %s\n\n* NEWS: Record release date.\n" "$ver" \ | git commit -F - -a || die 'git commit failed' git tag -s -m "$pkg $ver" v$ver HEAD || die 'git tag failed' -- cgit v1.2.1