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