website-build: serve.sh: help: fix program name.
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 <GNUtoo@cyberdimension.org>
This commit is contained in:
parent
fc344de493
commit
a357b3dcb9
|
@ -18,12 +18,14 @@ set -e
|
||||||
|
|
||||||
usage()
|
usage()
|
||||||
{
|
{
|
||||||
echo "$0 <path/to/tarball> [PORT]"
|
progname="$1"
|
||||||
|
|
||||||
|
echo "${progname} <path/to/tarball> [PORT]"
|
||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
|
|
||||||
if [ $# -ne 1 ] && [ $# -ne 2 ] ; then
|
if [ $# -ne 1 ] && [ $# -ne 2 ] ; then
|
||||||
usage
|
usage "serve.sh"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
basedir="$(dirname $(realpath $0))"
|
basedir="$(dirname $(realpath $0))"
|
||||||
|
|
Loading…
Reference in New Issue