debug() accepts stdin

This commit is contained in:
Jérémy Lecour 2022-04-26 18:16:47 +02:00 committed by Jérémy Lecour
parent 805e23e7e3
commit 83a7d32766
1 changed files with 2 additions and 1 deletions

View File

@ -76,7 +76,8 @@ END
}
debug() {
if [ "${VERBOSE}" = "1" ]; then
echo "$1"
msg="${1:-$(cat /dev/stdin)}"
echo "${msg}"
fi
}