aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar David Leverton <levertond@googlemail.com> 2008-03-25 20:49:49 +0000
committerAvatar David Leverton <levertond@googlemail.com> 2008-03-25 20:49:49 +0000
commite7be5401332cddbfc64f41842110286205926936 (patch)
tree00a6afa81d33119474e61fc18bfbaea6313add1a
parent419cc831c729147b9c986c15f62db163705e1e5f (diff)
downloadpaludis-e7be5401332cddbfc64f41842110286205926936.tar.gz
paludis-e7be5401332cddbfc64f41842110286205926936.tar.xz
Make echo_functions stdout/stderr behaviour match portage more closely, and make pioto happy.
-rwxr-xr-xhooks/news_TEST4
-rw-r--r--paludis/util/echo_functions.bash.in10
2 files changed, 7 insertions, 7 deletions
diff --git a/hooks/news_TEST b/hooks/news_TEST
index 4b77cf8..c9a8586 100755
--- a/hooks/news_TEST
+++ b/hooks/news_TEST
@@ -23,8 +23,8 @@ news_none_TEST()
export HOOK=sync_all_post
export PALUDIS_HOME=`pwd`/news_TEST_dir/one
- bash ${PALUDIS_HOOKER_DIR}/hooker.bash ${TOP_SRCDIR}/hooks/news.hook hook_run_sync_all_post 2>/dev/null ; test_return_code
- bash ${PALUDIS_HOOKER_DIR}/hooker.bash ${TOP_SRCDIR}/hooks/news.hook hook_run_sync_all_post 2>&1 \
+ bash ${PALUDIS_HOOKER_DIR}/hooker.bash ${TOP_SRCDIR}/hooks/news.hook hook_run_sync_all_post >/dev/null ; test_return_code
+ bash ${PALUDIS_HOOKER_DIR}/hooker.bash ${TOP_SRCDIR}/hooks/news.hook hook_run_sync_all_post \
| grep "No unread news items found" >/dev/null ; test_return_code
}
diff --git a/paludis/util/echo_functions.bash.in b/paludis/util/echo_functions.bash.in
index e6f1417..24fbba0 100644
--- a/paludis/util/echo_functions.bash.in
+++ b/paludis/util/echo_functions.bash.in
@@ -50,8 +50,8 @@ paludis_ecmd()
{
local cmd="$1" hook="$2" prefix="$3" message="$4" newline="$5"
- echo -n "${prefix}${message}" >&2
- [[ -z "${newline}" ]] && echo >&2
+ echo -n "${prefix}${message}"
+ [[ -z "${newline}" ]] && echo
if type perform_hook &>/dev/null ; then
if [[ -n "${hook}" ]] ; then
@@ -107,7 +107,7 @@ ewarn()
"ewarn" \
"ewarn" \
"`echo -ne " ${COLOUR_WARN}*${COLOUR_NORMAL} "`" \
- "$*"
+ "$*" >&2
}
eerror()
@@ -116,7 +116,7 @@ eerror()
"eerror" \
"eerror" \
"`echo -ne " ${COLOUR_BAD}*${COLOUR_NORMAL} "`" \
- "$*"
+ "$*" >&2
}
ebegin()
@@ -151,7 +151,7 @@ _eend()
msg="${COLOUR_BRACKET}[ ${COLOUR_BAD}!!${COLOUR_BRACKET} ]${COLOUR_NORMAL}"
fi
- echo -e "${PALUDIS_ENDCOL} ${msg}" >&2
+ echo -e "${PALUDIS_ENDCOL} ${msg}"
return ${retval}
}