Differences From Artifact [254d63007c]:
- Executable file global/common.sh — part of check-in [cef83f0167] at 2019-08-21 00:16:00 on branch trunk — switch ansi "bold off" code to "reset" for terminals that interpret "bold off" as "double underline"; remove (incorrect) test code from kiosend (user: lexi, size: 612) [annotate] [blame] [check-ins using]
To Artifact [2fb772064d]:
- Executable file global/common.sh — part of check-in [fd95e5bc93] at 2019-08-21 00:28:30 on branch trunk — Switch to using command -v to check for commands instead of which (user: glow, size: 617) [annotate] [blame] [check-ins using]
1 1 me=$0 2 2 say() { echo >&2 "[1m($me)[m $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