[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Reducing the number of executables to one

From: Christian Grothoff
Subject: Re: Reducing the number of executables to one
Date: Thu, 3 Mar 2022 00:01:11 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.12.0

Personally, I'm not a fan of this style. It just makes it less obvious
how to run the binaries under valgrind/gdb, adds just another process as
overhead, and may require re-writing documentation. It also removes the
ability to get a list of possible invocations via 'tab' easily (right
now, you can type "gnunet-<TAB><TAB>" and get a list of all available

So overall, the "benefit" of being able to remove the hyphen seems,
well, questionable. But I'm aware that it is the current fashion. But I
personally don't get that fashion.

On 2/27/22 11:20 AM, madmurphy wrote:
> This is more like a long term plan and nothing really important…
> I saw that the amount of command line utilities that GNUnet ships is
> quite sizeable and is probably only destined to grow (I have counted 70
> executables in |/usr/bin|); so I was thinking that GNUnet could follow
> git's approach, that of having one single executable in |/usr/bin|, and
> do something like |gnunet COMMAND OPTIONS ARGUMENTS|.
> As all the executables are named |gnunet-SOMETHING|, this would
> basically only remove the hyphen. For example, |gnunet-search 'commons'|
> would become |gnunet search 'commons'|.
> It can be done with a shell script as simple as:
> #!/bin/sh
> #
> # /usr/bin/gnunet
> #
> _GNUNET_UTIL_DIR_='/foo/bar'
> if [[ -f "${_GNUNET_UTIL_DIR_}/gnunet-${1}" ]]; then
>       "${_GNUNET_UTIL_DIR_}/gnunet-${1}" "${@:2}"
> else
>       echo "Unknown command \"${1}\"."
> fi
> (where |/foo/bar| is the directory where the executables are actually
> installed.)
> What do you think?
> --madmurphy

reply via email to

[Prev in Thread] Current Thread [Next in Thread]