1
0
Fork 0
mirror of synced 2024-06-16 04:41:09 -04:00

Replace echo with printf (#87)

This commit is contained in:
Tim Byrne 2017-09-15 18:35:41 -05:00
parent abf6cd1c4c
commit 57866714c4
No known key found for this signature in database
GPG key ID: 14DB4FC2465A4B12

18
yadm
View file

@ -875,13 +875,13 @@ function set_operating_system() {
function debug() { function debug() {
[ -n "$DEBUG" ] && echo -e "DEBUG: $*" [ -n "$DEBUG" ] && echo_e "DEBUG: $*"
} }
function error_out() { function error_out() {
echo -e "ERROR: $*" echo_e "ERROR: $*"
exit_with_hook 1 exit_with_hook 1
} }
@ -1072,6 +1072,20 @@ function mixed_path() {
fi 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) ****** #; ****** Main processing (when not unit testing) ******
if [ "$YADM_TEST" != 1 ] ; then if [ "$YADM_TEST" != 1 ] ; then