summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHolger Freyther <zecke@selfish.org>2008-01-07 18:25:55 +0000
committerHolger Freyther <zecke@selfish.org>2008-01-07 18:25:55 +0000
commit484aec6e78dd9624f20779130565d1774d5b9e9f (patch)
tree669af5386d34b447d37985fb5ab095bf851c3a68
parentd1631785248a72bb4d02cd55307b2a994fa5673a (diff)
Bashism fix: echo -e is a bashism and doesn't work when /bin/sh points to dash
Instead of using "echo -e" we simply use printf. printf doesn't add a newline by default. So some places needed an extra \n in their string. Most of the change was done by hand, so please carefully review. This bug was spotted when trying to compile python-pyqt on my ubuntu hardy system.
-rw-r--r--classes/opie_i18n.bbclass20
-rw-r--r--classes/rootfs_deb.bbclass2
-rw-r--r--classes/rootfs_ipk.bbclass2
-rw-r--r--packages/dpkg/dpkg.inc4
-rw-r--r--packages/freenote/freenote_1.12.0.bb2
-rw-r--r--packages/gpe-session-scripts/gpe-session-scripts_0.67.bb2
-rw-r--r--packages/helloworld/helloworld_1.0.0.bb2
-rw-r--r--packages/kdepimpi/kdepimpi-base.inc2
-rw-r--r--packages/knights/knights_1.14.bb2
-rw-r--r--packages/mgetty/mgetty_1.1.30.bb2
-rw-r--r--packages/nonworking/imkit/imkit_0.4.5.bb2
-rw-r--r--packages/nunome/nunome_1.0.2.bb8
-rw-r--r--packages/python/python-pyqt_4.3.3.bb2
-rw-r--r--packages/python/python24-pyqt2_3.13.bb2
-rw-r--r--packages/python/python24-pyqwt2_3.10.bb2
-rw-r--r--packages/qpe-games/crossword_0.0.3.bb2
-rw-r--r--packages/slutils/slutils_0.1.0.bb2
17 files changed, 30 insertions, 30 deletions
diff --git a/classes/opie_i18n.bbclass b/classes/opie_i18n.bbclass
index cb3d07de75..107d090451 100644
--- a/classes/opie_i18n.bbclass
+++ b/classes/opie_i18n.bbclass
@@ -13,7 +13,7 @@ SRC_URI += "${HANDHELDS_CVS};module=opie/i18n"
DEPENDS += "opie-i18n"
die () {
- echo -e "opie_18n: ERROR: $1"
+ printf "opie_18n: ERROR: $1\n"
exit 1
}
@@ -60,21 +60,21 @@ do_build_opie_i18n () {
package_name2="`echo "${PN}"| sed "s/^opie\-//;s/\-//"`"
test "$package_name" != "$package_name2" && I18N_FILES="${package_name}.ts lib${package_name}.ts opie-${package_name}.ts ${package_name2}.ts lib${package_name2}.ts opie-${package_name2}.ts"
test "$package_name" = "$package_name2" && I18N_FILES="${package_name}.ts lib${package_name}.ts opie-${package_name}.ts"
- echo -e "I18N Datafiles: ${I18N_FILES} (auto-detected)\nYou can overide the auto-detection by setting I18N_FILES in your .oe file"
+ printf "I18N Datafiles: ${I18N_FILES} (auto-detected)\nYou can overide the auto-detection by setting I18N_FILES in your .oe file\n"
else
echo "I18N Datafiles: ${I18N_FILES} (provided by .bb)"
fi
rm -f "${WORKDIR}/FILES.tmp" "${WORKDIR}/PACKAGES.tmp"
- echo -e "\nFILES is set to [${FILES}]\n"
+ printf "\nFILES is set to [${FILES}]\n\n"
for file in ${I18N_FILES}
do
echo "Working on [$file]"
for ts_file in `ls -1 */*.ts | egrep "/$file"`
do
- echo -e "\tCompiling [$ts_file]"
+ printf "\tCompiling [$ts_file]\n"
cd "${WORKDIR}/i18n/`dirname $ts_file`" || die "[${WORKDIR}/i18n/`dirname $ts_file`] not found"
opie-lrelease "`basename $ts_file`" || die "lrelease failed! Make sure that <inherit opie_i18n> or <inherit opie> is *below* <DEPENDS =>!"
@@ -82,7 +82,7 @@ do_build_opie_i18n () {
# to allow packaging as "_" is not allowed in a package name
lang="`echo "$ts_file" | sed -n "s#\(.*\)/\(.*\)#\1#p"`"
lang_sane="`echo "$ts_file" | sed -n "s#\(.*\)/\(.*\)#\1#p"|sed s/\_/\-/`"
- echo -e "\tPackaging [`basename $ts_file`] for language [$lang]"
+ printf "\tPackaging [`basename $ts_file`] for language [$lang]\n"
install -d ${D}${palmtopdir}/i18n/$lang
install -m 0644 ${WORKDIR}/i18n/$lang/.directory ${D}${palmtopdir}/i18n/$lang/
@@ -93,14 +93,14 @@ do_build_opie_i18n () {
# function do_build_opie_i18n_data() which sets the variables FILES_* and
# PACKAGES as needed.
echo -n "${PN}-${lang_sane} " >> "${WORKDIR}/PACKAGES.tmp"
- echo -e "${PN}-${lang_sane}#${palmtopdir}/i18n/$lang" >> "${WORKDIR}/FILES.tmp"
+ printf "${PN}-${lang_sane}#${palmtopdir}/i18n/$lang" >> "${WORKDIR}/FILES.tmp\n"
ts_found_something=1
done
if test "$ts_found_something" != 1
then
- echo -e "\tNo translations found"
+ printf "\tNo translations found\n"
else
ts_found_something=""
ts_found="$ts_found $file"
@@ -109,7 +109,7 @@ do_build_opie_i18n () {
# Only used for debugging purposes
test "${I18N_STATS}" = 1 && cd "${WORKDIR}/i18n"
- echo -e "Completed [$file]\n\n"
+ printf "Completed [$file]\n\n\n"
done
qt_dirs="apps bin etc lib pics plugins share sounds"
@@ -125,7 +125,7 @@ do_build_opie_i18n () {
if (echo "${FILES}" | egrep "${palmtopdir}/? |${palmtopdir}/?$") &>/dev/null
then
echo "NOTE: FILES was set to ${palmtopdir} which would include the i18n directory"
- echo -e "\n\nI'll remove ${palmtopdir} from FILES and replace it with all directories"
+ printf "\n\nI'll remove ${palmtopdir} from FILES and replace it with all directories\n"
echo "below QtPalmtop, except i18n ($qt_dirs). See classes/opie_i18n.oeclass for details"
# Removes /opt/QtPalmtop from FILES but keeps /opt/QtPalmtop/$some_dir
@@ -138,7 +138,7 @@ do_build_opie_i18n () {
if test -z "${FILES}"
then
echo "NOTE:"
- echo -e "Since FILES is empty, i'll add all directories below ${palmtopdir} to it,\nexcluding i18n: ( $qt_dirs )"
+ printf "Since FILES is empty, i'll add all directories below ${palmtopdir} to it,\nexcluding i18n: ( $qt_dirs )\n"
echo "${PN}#$FILES $dir_" >> "${WORKDIR}/FILES.tmp"
fi
diff --git a/classes/rootfs_deb.bbclass b/classes/rootfs_deb.bbclass
index 853ea225fc..c2c4a764e4 100644
--- a/classes/rootfs_deb.bbclass
+++ b/classes/rootfs_deb.bbclass
@@ -145,7 +145,7 @@ rootfs_deb_log_check() {
if (echo "$lf_txt" | grep -v log_check | grep "$keyword_die") >/dev/null 2>&1
then
echo "log_check: There were error messages in the logfile"
- echo -e "log_check: Matched keyword: [$keyword_die]\n"
+ printf "log_check: Matched keyword: [$keyword_die]\n"
echo "$lf_txt" | grep -v log_check | grep -C 5 -i "$keyword_die"
echo ""
do_exit=1
diff --git a/classes/rootfs_ipk.bbclass b/classes/rootfs_ipk.bbclass
index c6e2099e7c..28ba03d675 100644
--- a/classes/rootfs_ipk.bbclass
+++ b/classes/rootfs_ipk.bbclass
@@ -71,7 +71,7 @@ rootfs_ipk_log_check() {
if (echo "$lf_txt" | grep -v log_check | grep "$keyword_die") >/dev/null 2>&1
then
echo "log_check: There were error messages in the logfile"
- echo -e "log_check: Matched keyword: [$keyword_die]\n"
+ printf "log_check: Matched keyword: [$keyword_die]\n"
echo "$lf_txt" | grep -v log_check | grep -i "$keyword_die" -C1
echo ""
do_exit=1
diff --git a/packages/dpkg/dpkg.inc b/packages/dpkg/dpkg.inc
index 5fab2a7e3a..1065f2c186 100644
--- a/packages/dpkg/dpkg.inc
+++ b/packages/dpkg/dpkg.inc
@@ -22,9 +22,9 @@ pkg_postinst_dpkg () {
if [ "x$D" != "x" ]; then
install -d ${IMAGE_ROOTFS}/${sysconfdir}/rcS.d
# this happens at S98 where our good 'ole packages script used to run
- echo -e "#!/bin/sh
+ printf "#!/bin/sh
dpkg --configure -a
-" > ${IMAGE_ROOTFS}/${sysconfdir}/rcS.d/S${DPKG_INIT_POSITION}configure
+\n" > ${IMAGE_ROOTFS}/${sysconfdir}/rcS.d/S${DPKG_INIT_POSITION}configure
chmod 0755 ${IMAGE_ROOTFS}/${sysconfdir}/rcS.d/S${DPKG_INIT_POSITION}configure
fi
}
diff --git a/packages/freenote/freenote_1.12.0.bb b/packages/freenote/freenote_1.12.0.bb
index 72610c306c..e28689ebf0 100644
--- a/packages/freenote/freenote_1.12.0.bb
+++ b/packages/freenote/freenote_1.12.0.bb
@@ -15,7 +15,7 @@ inherit opie
do_configure_prepend() {
mv -f FreeNote subdir1
mv -f FreeNoteSetup subdir2
- echo -e "TEMPLATE=subdirs\nSUBDIRS=subdir1 subdir2\n" >> freenote.pro
+ printf "TEMPLATE=subdirs\nSUBDIRS=subdir1 subdir2\n" >> freenote.pro
pushd ${S}/subdir1 && rm *.pro && qmake -project && echo "TARGET=FreeNote" >> subdir1.pro && popd
pushd ${S}/subdir2 && rm *.pro && qmake -project && echo "TARGET=FreeNoteSetup" >> subdir2.pro && popd
}
diff --git a/packages/gpe-session-scripts/gpe-session-scripts_0.67.bb b/packages/gpe-session-scripts/gpe-session-scripts_0.67.bb
index 75b79ec870..b8d91538c6 100644
--- a/packages/gpe-session-scripts/gpe-session-scripts_0.67.bb
+++ b/packages/gpe-session-scripts/gpe-session-scripts_0.67.bb
@@ -35,7 +35,7 @@ do_install_append() {
fi
install -d ${D}${sysconfdir}/matchbox
install ${WORKDIR}/matchbox-session ${D}${sysconfdir}/matchbox/session
- echo -e "exec matchbox-window-manager ${CURSOR_HIDE} \$@ \n" >> ${D}${sysconfdir}/matchbox/session
+ printf "exec matchbox-window-manager ${CURSOR_HIDE} \$@ \n" >> ${D}${sysconfdir}/matchbox/session
install -d ${D}${sysconfdir}/gpe/xsettings-default.d
diff --git a/packages/helloworld/helloworld_1.0.0.bb b/packages/helloworld/helloworld_1.0.0.bb
index da4daa408d..af29a7769a 100644
--- a/packages/helloworld/helloworld_1.0.0.bb
+++ b/packages/helloworld/helloworld_1.0.0.bb
@@ -7,7 +7,7 @@ S = "${WORKDIR}/${P}"
do_fetch () {
mkdir -p ${WORKDIR}/${P}
cd ${WORKDIR}/${P}
- echo -e "#include <stdio.h>\nint main(void)\n{\n\tprintf(\"Hello world!\\\n\");\twhile(1);\n\treturn 0;\n}\n" >helloworld.c
+ printf "#include <stdio.h>\nint main(void)\n{\n\tprintf(\"Hello world!\\\n\");\twhile(1);\n\treturn 0;\n}\n" >helloworld.c
}
do_compile () {
diff --git a/packages/kdepimpi/kdepimpi-base.inc b/packages/kdepimpi/kdepimpi-base.inc
index 5a50be3de7..036292d81f 100644
--- a/packages/kdepimpi/kdepimpi-base.inc
+++ b/packages/kdepimpi/kdepimpi-base.inc
@@ -53,7 +53,7 @@ inherit palmtop
do_configure_prepend() {
mv ${S}/kabc/formats/binary/kabcformat_binaryE.pro ${S}/kabc/formats/binary/binaryE.pro
- echo -e "TEMPLATE=subdirs\nSUBDIRS=${SUBDIRS}\n" >all.pro
+ printf "TEMPLATE=subdirs\nSUBDIRS=${SUBDIRS}\n" >all.pro
for d in ${SUBDIRS}
do
if [ -f ${d}/`basename ${d}`E.pro ];
diff --git a/packages/knights/knights_1.14.bb b/packages/knights/knights_1.14.bb
index 1e0766a7c7..dc3e026376 100644
--- a/packages/knights/knights_1.14.bb
+++ b/packages/knights/knights_1.14.bb
@@ -17,7 +17,7 @@ inherit palmtop
QMAKE_PROFILES = "knights.pro"
do_configure_prepend() {
- echo -e "TEMPLATE=subdirs\nSUBDIRS=qtcompat microkde knights\n" >knights.pro
+ printf "TEMPLATE=subdirs\nSUBDIRS=qtcompat microkde knights\n" >knights.pro
}
do_install() {
diff --git a/packages/mgetty/mgetty_1.1.30.bb b/packages/mgetty/mgetty_1.1.30.bb
index 2760b4717e..43c870fc30 100644
--- a/packages/mgetty/mgetty_1.1.30.bb
+++ b/packages/mgetty/mgetty_1.1.30.bb
@@ -61,7 +61,7 @@ do_compile () {
-DVARRUNDIR=\"/var/run\" \
-DAWK=\"awk\" \
-DPERL=\""${bindir}/perl -w"\" -DTKPERL=\"${bindir}/tkperl\" \
- -DECHO=\""echo -e"\" \
+ -DECHO=\""printf"\" \
-DSHELL=\"/bin/bash\" \
-o mksed mksed.c
./mksed >sedscript
diff --git a/packages/nonworking/imkit/imkit_0.4.5.bb b/packages/nonworking/imkit/imkit_0.4.5.bb
index a07e2c4849..04b65c066f 100644
--- a/packages/nonworking/imkit/imkit_0.4.5.bb
+++ b/packages/nonworking/imkit/imkit_0.4.5.bb
@@ -16,5 +16,5 @@ PARALLEL_MAKE = ""
QMAKE_PROFILES = "imkit.pro"
do_configure_prepend() {
- echo -e "TEMPLATE=subdirs\nSUBDIRS=libimkit impls/anthy\n" > imkit.pro
+ printf "TEMPLATE=subdirs\nSUBDIRS=libimkit impls/anthy\n" > imkit.pro
}
diff --git a/packages/nunome/nunome_1.0.2.bb b/packages/nunome/nunome_1.0.2.bb
index 044ed1358c..4dd1519536 100644
--- a/packages/nunome/nunome_1.0.2.bb
+++ b/packages/nunome/nunome_1.0.2.bb
@@ -20,11 +20,11 @@ PARALLEL_MAKE = ""
do_configure_prepend() {
sed -i -e 's,/opt/QtPalmtop/bin/,${bindir}/,g' "${S}/ui/nunome.h"
sed -i -e 's,/opt/QtPalmtop/,${palmtopdir}/,g' "${S}/ui/nunome.h"
- echo -e "TEMPLATE=subdirs\nSUBDIRS=Nnmlib server ui dicman ui" >nunome.pro
+ printf "TEMPLATE=subdirs\nSUBDIRS=Nnmlib server ui dicman ui\n" >nunome.pro
pushd Nnmlib && qmake -project -t lib && popd
- pushd server && qmake -project && echo -e "LIBS+=-lNnmlib\nTARGET=server.bin" >> server.pro && popd
- pushd dicman && qmake -project && echo -e "LIBS+=-lnunome -lNnmlib\nTARGET=dicman.bin" >> dicman.pro && popd
- pushd ui && qmake -project -t lib && echo -e "LIBS+=-lNnmlib\nTARGET=nunome" >> ui.pro && popd
+ pushd server && qmake -project && printf "LIBS+=-lNnmlib\nTARGET=server.bin\n" >> server.pro && popd
+ pushd dicman && qmake -project && printf "LIBS+=-lnunome -lNnmlib\nTARGET=dicman.bin\n" >> dicman.pro && popd
+ pushd ui && qmake -project -t lib && printf "LIBS+=-lNnmlib\nTARGET=nunome\n" >> ui.pro && popd
find . -name "moc*"|xargs rm -f
find . -name "Makefile"|xargs rm -f
}
diff --git a/packages/python/python-pyqt_4.3.3.bb b/packages/python/python-pyqt_4.3.3.bb
index 773f646788..2fd6fcc38b 100644
--- a/packages/python/python-pyqt_4.3.3.bb
+++ b/packages/python/python-pyqt_4.3.3.bb
@@ -45,7 +45,7 @@ do_generate_prepend() {
}
do_configure_prepend() {
- echo -e "TEMPLATE=subdirs\nSUBDIRS=${SIP_MODULES}\n" >pyqt.pro
+ printf "TEMPLATE=subdirs\nSUBDIRS=${SIP_MODULES}\n" >pyqt.pro
}
do_stage() {
diff --git a/packages/python/python24-pyqt2_3.13.bb b/packages/python/python24-pyqt2_3.13.bb
index 04493857dc..dc93d28a09 100644
--- a/packages/python/python24-pyqt2_3.13.bb
+++ b/packages/python/python24-pyqt2_3.13.bb
@@ -35,7 +35,7 @@ EXTRA_QMAKEVARS_POST += "QMAKE_UIC=${STAGING_BINDIR_NATIVE}/uic \
LIBS+=-L${STAGING_LIBDIR}/${PYTHON_DIR}/site-packages"
do_configure_prepend() {
- echo -e "TEMPLATE=subdirs\nSUBDIRS=qt qtcanvas qttable qtpe\n" >pyqt.pro
+ printf "TEMPLATE=subdirs\nSUBDIRS=qt qtcanvas qttable qtpe\n" >pyqt.pro
}
do_stage() {
diff --git a/packages/python/python24-pyqwt2_3.10.bb b/packages/python/python24-pyqwt2_3.10.bb
index 28f4080c45..4f1f9bc0c9 100644
--- a/packages/python/python24-pyqwt2_3.10.bb
+++ b/packages/python/python24-pyqwt2_3.10.bb
@@ -33,7 +33,7 @@ EXTRA_QMAKEVARS_POST += "TARGET=qwt \
LIBS+=-L${STAGING_LIBDIR}/${PYTHON_DIR}/site-packages"
do_generate_prepend() {
- echo -e "TEMPLATE=subdirs\nSUBDIRS=qwt\n" >pyqwt.pro
+ printf "TEMPLATE=subdirs\nSUBDIRS=qwt\n" >pyqwt.pro
echo "%Makefile qwt.pro.in" >>sip/qwtmod.sip
echo "TEMPLATE=lib" >>sip/qwtmod.sip
diff --git a/packages/qpe-games/crossword_0.0.3.bb b/packages/qpe-games/crossword_0.0.3.bb
index b46c0d92f2..db468235f1 100644
--- a/packages/qpe-games/crossword_0.0.3.bb
+++ b/packages/qpe-games/crossword_0.0.3.bb
@@ -26,7 +26,7 @@ pkg_postinst() {
MIMEFILE=/opt/QtPalmtop/etc/mime.types
-grep -q application/puz $MIMEFILE 2>/dev/null || echo -e "application/crossword\t\tpuz tpz" >> $MIMEFILE
+grep -q application/puz $MIMEFILE 2>/dev/null || printf "application/crossword\t\tpuz tpz\n" >> $MIMEFILE
}
inherit opie
diff --git a/packages/slutils/slutils_0.1.0.bb b/packages/slutils/slutils_0.1.0.bb
index 67d760cecb..8b7d6f6ce9 100644
--- a/packages/slutils/slutils_0.1.0.bb
+++ b/packages/slutils/slutils_0.1.0.bb
@@ -26,7 +26,7 @@ do_fetch() {
do_configure_prepend() {
cd ${S}/
- echo -e "TEMPLATE=subdirs\nSUBDIRS=${UTILS}\n" >slutils.pro
+ printf "TEMPLATE=subdirs\nSUBDIRS=${UTILS}\n" >slutils.pro
}
do_install() {