diff options
author | Daniel Baumann <daniel@debian.org> | 2010-09-26 12:38:38 +0200 |
---|---|---|
committer | Daniel Baumann <daniel@debian.org> | 2011-03-09 19:19:23 +0100 |
commit | c5c3f6133a0fb62ba9c2c3b839e6ea5774f9c76a (patch) | |
tree | 44a6d3a12cd11067aea2a4d43eb9133cc25bad2f /functions/echo.sh | |
parent | 941a47be0ca3061f54a237583092357d1ff80f7c (diff) | |
download | vyos-live-build-c5c3f6133a0fb62ba9c2c3b839e6ea5774f9c76a.tar.gz vyos-live-build-c5c3f6133a0fb62ba9c2c3b839e6ea5774f9c76a.zip |
Adding debian version 3.0~a1-1.
Diffstat (limited to 'functions/echo.sh')
-rwxr-xr-x | functions/echo.sh | 65 |
1 files changed, 55 insertions, 10 deletions
diff --git a/functions/echo.sh b/functions/echo.sh index 7dbfac4d7..555bc42bb 100755 --- a/functions/echo.sh +++ b/functions/echo.sh @@ -1,7 +1,7 @@ #!/bin/sh ## live-build(7) - System Build Scripts -## Copyright (C) 2006-2011 Daniel Baumann <daniel@debian.org> +## Copyright (C) 2006-2010 Daniel Baumann <daniel@debian.org> ## ## live-build comes with ABSOLUTELY NO WARRANTY; for details see COPYING. ## This is free software, and you are welcome to redistribute it @@ -13,7 +13,12 @@ Echo () STRING="${1}" shift - printf "${STRING}\n" "${@}" + if [ "${_L10N}" = "false" ] + then + printf "${STRING}\n" "${@}" + else + printf "$(eval_gettext "${STRING}")" "${@}"; echo; + fi } Echo_debug () @@ -23,7 +28,12 @@ Echo_debug () STRING="${1}" shift - printf "D: ${STRING}\n" "${@}" + if [ "${_L10N}" = "false" ] + then + printf "D: ${STRING}\n" "${@}" + else + printf "D: $(eval_gettext "${STRING}")" "${@}"; echo; + fi fi } @@ -34,7 +44,12 @@ Echo_debug_running () STRING="${1}" shift - printf "D: ${STRING}" "${@}" + if [ "${_L10N}" = "false" ] + then + printf "D: ${STRING}" "${@}" + else + printf "D: $(eval_gettext "${STRING}")" "${@}" + fi if [ "${_COLOR}" = "false" ] then @@ -57,7 +72,12 @@ Echo_error () printf "${RED}E${NO_COLOR}:" fi - printf " ${STRING}\n" "${@}" >&2 + if [ "${_L10N}" = "false" ] + then + printf " ${STRING}\n" "${@}" >&2 + else + (printf " $(eval_gettext "${STRING}")" "${@}"; echo;) >&2 + fi } Echo_message () @@ -74,7 +94,12 @@ Echo_message () printf "${WHITE}P${NO_COLOR}:" fi - printf " ${STRING}\n" "${@}" + if [ "${_L10N}" = "false" ] + then + printf " ${STRING}\n" "${@}" + else + printf " $(eval_gettext "${STRING}")" "${@}"; echo; + fi fi } @@ -92,7 +117,12 @@ Echo_message_running () printf "${WHITE}P${NO_COLOR}:" fi - printf " ${STRING}" "${@}" + if [ "${_L10N}" = "false" ] + then + printf " ${STRING}" "${@}" + else + printf " $(eval_gettext "${STRING}")" "${@}"; + fi if [ "${_COLOR}" = "false" ] then @@ -110,7 +140,12 @@ Echo_verbose () STRING="${1}" shift - printf "I: ${STRING}\n" "${@}" + if [ "${_L10N}" = "false" ] + then + printf "I: ${STRING}\n" "${@}" + else + printf "I: $(eval_gettext "${STRING}")" "${@}"; echo; + fi fi } @@ -121,7 +156,12 @@ Echo_verbose_running () STRING="${1}" shift - printf "I: ${STRING}" "${@}" + if [ "${_L10N}" = "false" ] + then + printf "I: ${STRING}" "${@}" + else + printf "I: $(eval_gettext "${STRING}")" "${@}"; + fi if [ "${_COLOR}" = "false" ] then @@ -144,7 +184,12 @@ Echo_warning () printf "${YELLOW}W${NO_COLOR}:" fi - printf " ${STRING}\n" "${@}" + if [ "${_L10N}" = "false" ] + then + printf " ${STRING}\n" "${@}" + else + printf " $(eval_gettext "${STRING}")" "${@}"; echo; + fi } Echo_status () |