Bug#930447: nvidia-detect: [PATCH] Add option to only output package name if possible

Andreas Beckmann anbe at debian.org
Fri Sep 25 00:06:30 BST 2020


On 6/12/19 10:35 PM, Markus Lindberg wrote:
> This is quite a big diff since it's was tricky to adapt the new option
> while not changing to much. Please let me know if this can be done
> better or should be avoided.

This can be simplified by conditionally redirecting stdout globally to
/dev/null if terse output is wanted:

#!/bin/sh

if [ "$1" ]; then
exec 3>&1
exec 1>/dev/null
fi

echo verbose

if [ "$1" ]; then
echo terse >&3
fi

> The possibility to use long options (eg.
> --help) was removed since getopts only supports short options (eg. -h).

no objection

Andreas



More information about the pkg-nvidia-devel mailing list