[Top][All Lists]

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

Reducing the number of executables to one

From: madmurphy
Subject: Reducing the number of executables to one
Date: Sun, 27 Feb 2022 10:20:53 +0000

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:

# /usr/bin/gnunet


if [[ -f "${_GNUNET_UTIL_DIR_}/gnunet-${1}" ]]; then
	"${_GNUNET_UTIL_DIR_}/gnunet-${1}" "${@:2}"
	echo "Unknown command \"${1}\"."

(where /foo/bar is the directory where the executables are actually installed.)

What do you think?


reply via email to

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