# Change delimiter from pipe to -> and set style for recommend lines
sed -i -e 's:|: -> :' -e 's:\[REC\]:[style=dotted]:' -e 's:$:;:' ${BUILDHISTORY_DIR_IMAGE}/depends.tmp
# Add header, sorted and de-duped contents and footer and then delete the temp file
- echo -e "digraph depends {\n node [shape=plaintext]" > ${BUILDHISTORY_DIR_IMAGE}/depends.dot
+ printf "digraph depends {\n node [shape=plaintext]\n" > ${BUILDHISTORY_DIR_IMAGE}/depends.dot
cat ${BUILDHISTORY_DIR_IMAGE}/depends.tmp | sort | uniq >> ${BUILDHISTORY_DIR_IMAGE}/depends.dot
echo "}" >> ${BUILDHISTORY_DIR_IMAGE}/depends.dot
rm ${BUILDHISTORY_DIR_IMAGE}/depends.tmp
# Produce installed package sizes list
- echo -n > ${BUILDHISTORY_DIR_IMAGE}/installed-package-sizes.tmp
+ printf "" > ${BUILDHISTORY_DIR_IMAGE}/installed-package-sizes.tmp
cat $pkgcache | while read pkg pkgfile
do
if [ -f $pkgfile ] ; then
( cd ${IMAGE_ROOTFS} && find . -ls | awk '{ if ( $7 ~ /[0-9]/ ) printf "%s %10-s %10-s %10s %s %s %s\n", $3, $5, $6, $7, $11, $12, $13 ; else printf "%s %10-s %10-s %10s %s %s %s\n", $3, $5, $6, 0, $10, $11, $12 }' | sort -k5 > ${BUILDHISTORY_DIR_IMAGE}/files-in-image.txt )
# Record some machine-readable meta-information about the image
- echo -n > ${BUILDHISTORY_DIR_IMAGE}/image-info.txt
+ printf "" > ${BUILDHISTORY_DIR_IMAGE}/image-info.txt
cat >> ${BUILDHISTORY_DIR_IMAGE}/image-info.txt <<END
${@buildhistory_get_imagevars(d)}
END
except OSError:
mtime = 0
- oe_terminal("${SHELL} -c \"make menuconfig; if [ $? -ne 0 ]; then echo 'Command failed.'; echo -n 'Press any key to continue... '; read r; fi\"", '${PN} Configuration', d)
+ oe_terminal("${SHELL} -c \"make menuconfig; if [ $? -ne 0 ]; then echo 'Command failed.'; printf 'Press any key to continue... '; read r; fi\"", '${PN} Configuration', d)
# FIXME this check can be removed when the minimum bitbake version has been bumped
if hasattr(bb.build, 'write_taint'):
echo "PACKAGE NAME:" ${pkg} >> ${LICENSE_MANIFEST}
echo "PACKAGE VERSION:" ${pkged_pv} >> ${LICENSE_MANIFEST}
echo "RECIPE NAME:" ${pkged_pn} >> ${LICENSE_MANIFEST}
- echo -n "LICENSE:" >> ${LICENSE_MANIFEST}
+ printf "LICENSE:" >> ${LICENSE_MANIFEST}
for lic in ${pkged_lic}; do
# to reference a license file trim trailing + symbol
if [ -e "${LICENSE_DIRECTORY}/${pkged_pn}/generic_${lic%+}" ]; then
- echo -n " ${lic}" >> ${LICENSE_MANIFEST}
+ printf " ${lic}" >> ${LICENSE_MANIFEST}
else
echo "WARNING: The license listed ${lic} was not in the licenses collected for ${pkged_pn}"
fi
done
- echo -e "\n" >> ${LICENSE_MANIFEST}
+ printf "\n\n" >> ${LICENSE_MANIFEST}
done
# Two options here:
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\n"
echo "$lf_txt" | grep -v log_check | grep -C 5 -i "$keyword_die"
echo ""
do_exit=1
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\n"
echo "$lf_txt" | grep -v log_check | grep -C 5 -i "$keyword_die"
echo ""
do_exit=1
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\n"
echo "$lf_txt" | grep -v log_check | grep -C 5 -i "$keyword_die"
echo ""
do_exit=1
pkgs="$@"
local confbase=${INSTALL_CONFBASE_RPM}
- echo -n > ${target_rootfs}/install/base_archs.pkglist
- echo -n > ${target_rootfs}/install/ml_archs.pkglist
+ printf "" > ${target_rootfs}/install/base_archs.pkglist
+ printf "" > ${target_rootfs}/install/ml_archs.pkglist
for pkg in $pkgs; do
echo "Processing $pkg..."
DEFAULT_INSTALL_DIR="${SDKPATH}"
-echo -n "Enter target directory for Poky SDK (default: $DEFAULT_INSTALL_DIR): "
+printf "Enter target directory for Poky SDK (default: $DEFAULT_INSTALL_DIR): "
read target_sdk_dir
if [ "$target_sdk_dir" = "" ]; then
eval target_sdk_dir=$target_sdk_dir
target_sdk_dir=$(readlink -m $target_sdk_dir)
-echo -n "You are about to install Poky SDK to \"$target_sdk_dir\". Proceed[Y/n]?"
+printf "You are about to install Poky SDK to \"$target_sdk_dir\". Proceed[Y/n]?"
read answer
if [ "$answer" = "" ]; then
payload_offset=$(($(grep -na -m1 "^MARKER:$" $(basename $0)|cut -d':' -f1) + 1))
-echo -n "Extracting SDK..."
+printf "Extracting SDK..."
tail -n +$payload_offset $(basename $0) | tar xj --strip-components=4 -C $target_sdk_dir
echo "done"
-echo -n "Setting it up..."
+printf "Setting it up..."
# fix environment paths
env_setup_script=$(find $target_sdk_dir -name "environment-setup-${REAL_MULTIMACH_TARGET_SYS}")
sed -e "s:$DEFAULT_INSTALL_DIR:$target_sdk_dir:g" -i $env_setup_script
install -m 644 ${WORKDIR}/issue* ${D}${sysconfdir}
if [ -n "${DISTRO_NAME}" ]; then
- echo -n "${DISTRO_NAME} " >> ${D}${sysconfdir}/issue
- echo -n "${DISTRO_NAME} " >> ${D}${sysconfdir}/issue.net
+ printf "${DISTRO_NAME} " >> ${D}${sysconfdir}/issue
+ printf "${DISTRO_NAME} " >> ${D}${sysconfdir}/issue.net
if [ -n "${DISTRO_VERSION}" ]; then
- echo -n "${DISTRO_VERSION} " >> ${D}${sysconfdir}/issue
- echo -n "${DISTRO_VERSION} " >> ${D}${sysconfdir}/issue.net
+ printf "${DISTRO_VERSION} " >> ${D}${sysconfdir}/issue
+ printf "${DISTRO_VERSION} " >> ${D}${sysconfdir}/issue.net
fi
echo "\n \l" >> ${D}${sysconfdir}/issue
echo >> ${D}${sysconfdir}/issue
continue;;
esac
if [ "${AVOID_CONSTRUCTOR}" != "true" ]; then
- echo -n " const Arch Arch_${each_arch} " | tr - _ >> zypp/oe-arch.h
+ printf " const Arch Arch_${each_arch} " | tr - _ >> zypp/oe-arch.h
echo "(_${each_arch});" | tr - _ >> zypp/oe-arch.h
else
- echo -n " const Arch Arch_${each_arch} " | tr - _ >> zypp/oe-arch.h
+ printf " const Arch Arch_${each_arch} " | tr - _ >> zypp/oe-arch.h
echo "( IdString ( \"${each_arch}\" ) );" | tr - _ >> zypp/oe-arch.h
fi
done
mkdir -p ${D}${base_bindir}
mkdir -p ${D}/${baselib}
mkdir -p ${D}${sysconfdir}/lsb-release.d
- echo -n "LSB_VERSION=\"core-4.1-noarch:" > ${D}${sysconfdir}/lsb-release
+ printf "LSB_VERSION=\"core-4.1-noarch:" > ${D}${sysconfdir}/lsb-release
if [ "${TARGET_ARCH}" = "i586" ];then
- echo -n "core-4.1-ia32" >> ${D}${sysconfdir}/lsb-release
+ printf "core-4.1-ia32" >> ${D}${sysconfdir}/lsb-release
else
- echo -n "core-4.1-${TARGET_ARCH}" >> ${D}${sysconfdir}/lsb-release
+ printf "core-4.1-${TARGET_ARCH}" >> ${D}${sysconfdir}/lsb-release
fi
echo "\"" >> ${D}${sysconfdir}/lsb-release
echo "DISTRIB_ID=${DISTRO}" >> ${D}${sysconfdir}/lsb-release
image_details $IMAGE
device_details $(basename $DEVICE)
-echo -n "Write $IMAGE to $DEVICE [y/N]? "
+printf "Write $IMAGE to $DEVICE [y/N]? "
read RESPONSE
if [ "$RESPONSE" != "y" ]; then
echo "Write aborted"