buildsystem: replace printf with echo where able

Signed-off-by: Ian Leonard <antonlacon@gmail.com>
This commit is contained in:
Ian Leonard 2018-11-03 23:57:34 +00:00
parent acca8326ce
commit 59b2228fcd
3 changed files with 11 additions and 16 deletions

View File

@ -934,8 +934,7 @@ install_addon_files() {
install_driver_addon_files() {
if [ "$#" -eq 0 ] ; then
printf "$(print_color CLR_ERROR "no module search path defined")\n"
die
die "$(print_color CLR_ERROR "no module search path defined")"
fi
PKG_MODULE_DIR="$INSTALL/$(get_full_module_dir $PKG_ADDON_ID)/updates/$PKG_ADDON_ID"

View File

@ -93,9 +93,9 @@ function find_addons() {
# abort when nothing found and not embedded
if [ $? -ne 0 ]; then
printf "$(print_color CLR_ERROR "ERROR: '$1' matches nothing...")\n" ' '>&$SILENT_OUT
printf "for more informations type: ./scripts/create_addon --help\n" ' '>&$SILENT_OUT
exit 1
echo "$(print_color CLR_ERROR "ERROR: '$1' matches nothing...")" >&$SILENT_OUT
echo "for more informations type: ./scripts/create_addon --help" >&$SILENT_OUT
die
fi
fi
@ -297,13 +297,13 @@ for addon in $(tr " " "\n" <<< $addons | sort -u); do
fi
# build package
printf "$(print_color CLR_BUILD "CREATE ADDON $addon") (${DEVICE:-$PROJECT}/$TARGET_ARCH)\n" ' '>&$SILENT_OUT
echo "$(print_color CLR_BUILD "CREATE ADDON $addon") (${DEVICE:-$PROJECT}/$TARGET_ARCH)" >&$SILENT_OUT
_count+='x'
( build_addon $addon ) \
2>&1 | tee $log_file
if [ ${PIPESTATUS[0]} != 0 ]; then
addons_failed+="$addon "
printf "$(print_color CLR_ERROR "ADDON FAILED $addon")\n" ' '>&$SILENT_OUT
echo "$(print_color CLR_ERROR "ADDON FAILED $addon")" >&$SILENT_OUT
echo "failed: ${addon}" >> $summary_file
else
if [ "$remove_success_logs" = "true" ]; then
@ -321,10 +321,9 @@ fi
# print summary
if [ "$_count" != 'x' ]; then
if [ -z "$addons_failed" ]; then
printf "$(print_color CLR_INFO "ALL ADDONS BUILDS SUCCESSFUL")\n"
echo "$(print_color CLR_INFO "ALL ADDONS BUILDS SUCCESSFUL")"
exit 0
else
printf "$(print_color CLR_ERROR "FAILED ADDONS: $addons_failed")\n"
exit 1
die "$(print_color CLR_ERROR "FAILED ADDONS: $addons_failed")"
fi
fi

View File

@ -8,13 +8,11 @@
. config/options $1
if [ -z "$1" ]; then
echo "usage: $0 package_name"
exit 1
die "usage: $0 package_name"
fi
if [ -z "$INSTALL" ] ; then
echo "error: '\$INSTALL' not set! this script is not intended to be run manually"
exit 1
die "error: '\$INSTALL' not set! this script is not intended to be run manually"
fi
# set defaults
@ -38,8 +36,7 @@ if [ -n "$PKG_ARCH" ]; then
fi
if [ ! -f $PKG_DIR/package.mk ]; then
printf "$(print_color CLR_ERROR "${PACKAGE_NAME}: no package.mk file found")\n"
exit 1
die "$(print_color CLR_ERROR "${PACKAGE_NAME}: no package.mk file found")"
fi
$SCRIPTS/build $@