* debhelper v7; rules file minimisation
* Use DESTDIR instead of PREFIX.
* Add a DOCBOOK2XMAN setting. (Greg KH)
+ * ifne: Add -n which makes it run the command if stdin is empty.
+ * ifne: If no command is specified, print usage information.
-- Joey Hess <joeyh@debian.org> Sat, 26 Apr 2008 19:23:10 -0400
FILE *outf;
if ((argc < 2) || ((argc == 2) && streq(argv[1], "-n"))) {
- /* Noop */
- return EXIT_SUCCESS;
+ fprintf(stderr, "Usage: ifne [-n] command [args]\n");
+ return EXIT_FAILURE;
}
if (streq(argv[1], "-n")) {
<term><option>-n</option></term>
<listitem>
<para>Reverse operation. Run the command if the standard input is empty.</para>
+ <para>Note that if the standard input is not empty, it is passed through ifne
+ in this case.</para>
</listitem>
</varlistentry>
</variablelist>