/binfiles

Miscellaneous wrapper scripts

Primary LanguageM4Creative Commons Zero v1.0 UniversalCC0-1.0

binfiles

These are some utilities that are too tiny to have their own home.

grep_

Runs grep --color=auto, passing along any given arguments.

ls_

Runs ls -AFh, passing along any given arguments. If -A is not recognized, then -a is used instead; other unrecognized options are omitted without replacement. (Option support is tested at build time.)

Requirements

Installation and uninstallation

Run these commands from the directory containing the makefile (using make -C is fine). Feel free to replace sudo(1) with another tool (e.g., doas(1)) or omit it entirely if elevated privileges are not desired.

  • To install under /usr/local (the default) or some other path:

    make && sudo make install
    make && sudo make prefix=/some/other/path install
  • To uninstall from /usr/local (the default) or some other path:

    sudo make uninstall
    sudo make prefix=/some/other/path uninstall
  • To run basic tests:

    make check
    make installcheck
  • To clean up:

    make clean

The following make(1) macros are available for modifying the build process (as demonstrated above with prefix). Refer to the makefile for their default values.

  • bindir, DESTDIR, exec_prefix, and prefix are installation directories.

  • GREP is the grep(1) command hard-coded into grep_.

  • LS is the ls(1) command hard-coded into ls_.

  • SHELL is the shell hard-coded into the shebangs of shell scripts. (For some make(1) implementations, it is also the shell used to execute command lines.)

  • INSTALL, INSTALL_PROGRAM, M4 (with M4FLAGS) and SHELLCHECK (with SHELLCHECKFLAGS) are commands invoked by the build process.

To the extent possible under law, the author has dedicated all copyright and related and neighboring rights to this software to the public domain worldwide. This software is published from the United States of America and distributed without any warranty.

Refer to install-sh for its separate licensing terms.