diff options
Diffstat (limited to 'test/lib/log.sh')
| -rw-r--r-- | test/lib/log.sh | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/test/lib/log.sh b/test/lib/log.sh index b26e16a..242ab31 100644 --- a/test/lib/log.sh +++ b/test/lib/log.sh @@ -1,5 +1,5 @@ # Copyright (c) 2026 Egor Tensin <egor@tensin.name> -# This file is part of the "config-links" project. +# This file is part of the "Config file sharing" project. # For details, see https://github.com/egor-tensin/config-links # Distributed under the MIT License. @@ -10,6 +10,17 @@ log() { done } +log_run() { + if [ "$#" -lt 1 ]; then + log "usage: ${FUNCNAME[0]} ARGV0 [ARG...]" + return 1 + fi + + local msg='Running:' + msg="$msg$( printf -- ' %q' "$@" )" + log "$msg" +} + fail() { local msg for msg; do |
