libk  Check-in [fd95e5bc93]

Overview
Comment:Switch to using command -v to check for commands instead of which
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: fd95e5bc938c43fb8f49d01e6deff2aca2c7c9a38b279139e493dbae812aa484
User & Date: glow on 2019-08-21 00:28:30
Other Links: manifest | tags
Context
2019-08-21
01:20
rename $out build var to $to for nixos compat; refactor announce command to choose a color automatically instead of forcing it to be specified on every command line check-in: b590aba21d user: lexi tags: trunk
00:28
Switch to using command -v to check for commands instead of which check-in: fd95e5bc93 user: glow tags: trunk
00:16
switch ansi "bold off" code to "reset" for terminals that interpret "bold off" as "double underline"; remove (incorrect) test code from kiosend check-in: cef83f0167 user: lexi tags: trunk
Changes

Modified global/common.sh from [254d63007c] to [2fb772064d].

     1      1   me=$0
     2      2   say() { echo >&2 "($me) $1";      }
     3         -has() { which $1 >/dev/null 2>&1; return $?; }
            3  +has() { command -v $1 >/dev/null 2>&1; return $?; }
     4      4   check() {
     5      5   	var=$1
     6      6   	test "${!var}" == "" || return 0
     7      7   	say "we were not able to detect a default value for the configuration variable \$$var. please set this variable to $2 and try again."
     8      8   	exit 1
     9      9   }
    10     10