summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2009-05-01 21:43:32 +0000
committerZac Medico <zmedico@gentoo.org>2009-05-01 21:43:32 +0000
commite8517bdad2d390d414994a2e1b8a44d99b2489d5 (patch)
tree42c532c32df67336606d78ce07f8d74edd9f8fd3
parent1424ff742388dea70c46e8ab51b148c794ed1f23 (diff)
downloadportage-e8517bdad2d390d414994a2e1b8a44d99b2489d5.tar.gz
portage-e8517bdad2d390d414994a2e1b8a44d99b2489d5.tar.bz2
portage-e8517bdad2d390d414994a2e1b8a44d99b2489d5.zip
Make elog functions use read -r when splitting lines, so that backslashes
intended for display will not be eaten. svn path=/main/trunk/; revision=13582
-rwxr-xr-xbin/isolated-functions.sh22
1 files changed, 11 insertions, 11 deletions
diff --git a/bin/isolated-functions.sh b/bin/isolated-functions.sh
index 0d046cbda..8a7f899b9 100755
--- a/bin/isolated-functions.sh
+++ b/bin/isolated-functions.sh
@@ -182,7 +182,7 @@ elog_base() {
return 1
;;
esac
- echo -e "$@" | while read ; do
+ echo -e "$@" | while read -r ; do
echo "$messagetype $REPLY" >> \
"${T}/logging/${EBUILD_PHASE:-other}"
done
@@ -192,8 +192,8 @@ elog_base() {
eqawarn() {
elog_base QA "$*"
[[ ${RC_ENDCOL} != "yes" && ${LAST_E_CMD} == "ebegin" ]] && echo
- echo -e "$@" | while read ; do
- vecho -e " $WARN*$NORMAL $REPLY" >&2
+ echo -e "$@" | while read -r ; do
+ vecho " $WARN*$NORMAL $REPLY" >&2
done
LAST_E_CMD="eqawarn"
return 0
@@ -202,8 +202,8 @@ eqawarn() {
elog() {
elog_base LOG "$*"
[[ ${RC_ENDCOL} != "yes" && ${LAST_E_CMD} == "ebegin" ]] && echo
- echo -e "$@" | while read ; do
- echo -e " $GOOD*$NORMAL $REPLY"
+ echo -e "$@" | while read -r ; do
+ echo " $GOOD*$NORMAL $REPLY"
done
LAST_E_CMD="elog"
return 0
@@ -230,8 +230,8 @@ esyslog() {
einfo() {
elog_base INFO "$*"
[[ ${RC_ENDCOL} != "yes" && ${LAST_E_CMD} == "ebegin" ]] && echo
- echo -e "$@" | while read ; do
- echo -e " $GOOD*$NORMAL $REPLY"
+ echo -e "$@" | while read -r ; do
+ echo " $GOOD*$NORMAL $REPLY"
done
LAST_E_CMD="einfo"
return 0
@@ -248,8 +248,8 @@ einfon() {
ewarn() {
elog_base WARN "$*"
[[ ${RC_ENDCOL} != "yes" && ${LAST_E_CMD} == "ebegin" ]] && echo
- echo -e "$@" | while read ; do
- echo -e " $WARN*$NORMAL $RC_INDENTATION$REPLY" >&2
+ echo -e "$@" | while read -r ; do
+ echo " $WARN*$NORMAL $RC_INDENTATION$REPLY" >&2
done
LAST_E_CMD="ewarn"
return 0
@@ -258,8 +258,8 @@ ewarn() {
eerror() {
elog_base ERROR "$*"
[[ ${RC_ENDCOL} != "yes" && ${LAST_E_CMD} == "ebegin" ]] && echo
- echo -e "$@" | while read ; do
- echo -e " $BAD*$NORMAL $RC_INDENTATION$REPLY" >&2
+ echo -e "$@" | while read -r ; do
+ echo " $BAD*$NORMAL $RC_INDENTATION$REPLY" >&2
done
LAST_E_CMD="eerror"
return 0