From a357b3dcb914b0be44ef0a5cda481d574d962d62 Mon Sep 17 00:00:00 2001 From: Denis 'GNUtoo' Carikli Date: Mon, 20 May 2024 15:07:59 +0200 Subject: [PATCH] website-build: serve.sh: help: fix program name. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The GNU Coding Standards has the following in the chapter "4.8.1 --version"[1]: The program’s name should be a constant string; don’t compute it from argv[0]. The idea is to state the standard or canonical name for the program, not its file name. There are other ways to find out the precise file name where a command is found in PATH. [1]https://www.gnu.org/prep/standards/standards.html#g_t_002d_002dversion This fixes that. Signed-off-by: Denis 'GNUtoo' Carikli --- website-build/serve.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/website-build/serve.sh b/website-build/serve.sh index a826c69..8b53545 100755 --- a/website-build/serve.sh +++ b/website-build/serve.sh @@ -18,12 +18,14 @@ set -e usage() { - echo "$0 [PORT]" + progname="$1" + + echo "${progname} [PORT]" exit 1 } if [ $# -ne 1 ] && [ $# -ne 2 ] ; then - usage + usage "serve.sh" fi basedir="$(dirname $(realpath $0))"