Replace `echo` with `printf` (#87)

pull/91/head
Tim Byrne 7 years ago
parent abf6cd1c4c
commit 57866714c4
No known key found for this signature in database
GPG Key ID: 14DB4FC2465A4B12

18
yadm

@ -875,13 +875,13 @@ function set_operating_system() {
function debug() {
[ -n "$DEBUG" ] && echo -e "DEBUG: $*"
[ -n "$DEBUG" ] && echo_e "DEBUG: $*"
}
function error_out() {
echo -e "ERROR: $*"
echo_e "ERROR: $*"
exit_with_hook 1
}
@ -1072,6 +1072,20 @@ function mixed_path() {
fi
}
#; ****** echo replacements ******
function echo() {
IFS=' '
printf '%s\n' "$*"
}
function echo_n() {
IFS=' '
printf '%s' "$*"
}
function echo_e() {
IFS=' '
printf '%b\n' "$*"
}
#; ****** Main processing (when not unit testing) ******
if [ "$YADM_TEST" != 1 ] ; then

Loading…
Cancel
Save