scripts/unpack: convert to printf helper

Signed-off-by: Ian Leonard <antonlacon@gmail.com>
This commit is contained in:
Ian Leonard 2018-11-18 22:20:06 +00:00
parent 4c1c2e0066
commit c1471c1ffd

View File

@ -42,8 +42,7 @@ fi
[ -f "$STAMP" ] && exit 0
if [ -d "$SOURCES/$1" -o -d "$PKG_DIR/sources" ]; then
printf "%${BUILD_INDENT}c $(print_color CLR_UNPACK "UNPACK") $1\n" ' '>&$SILENT_OUT
export BUILD_INDENT=$((${BUILD_INDENT:-1}+$BUILD_INDENT_SIZE))
build_msg "CLR_UNPACK" "UNPACK" "${1}" "indent"
# unset functions
unset -f pre_unpack
@ -150,7 +149,7 @@ if [ -d "$SOURCES/$1" -o -d "$PKG_DIR/sources" ]; then
fi
if [ -f "$i" ]; then
printf "%${BUILD_INDENT}c $(print_color CLR_APPLY_PATCH "APPLY PATCH") $(print_color CLR_PATCH_DESC "${PATCH_DESC}") ${i#$ROOT/}\n" ' '>&$SILENT_OUT
build_msg "CLR_APPLY_PATCH" "APPLY PATCH $(print_color "CLR_PATCH_DESC" "${PATCH_DESC}")" "${i#${ROOT}/}"
if grep -qE '^GIT binary patch$|^rename from|^rename to' $i; then
cat $i | git apply --directory=$(echo "$PKG_BUILD" | cut -f1 -d\ ) -p1 --verbose --whitespace=nowarn --unsafe-paths >&$VERBOSE_OUT
else
@ -166,7 +165,7 @@ if [ -d "$SOURCES/$1" -o -d "$PKG_DIR/sources" ]; then
if [ ! "$PKG_NAME" = "configtools" ] ; then
for config in $(find "$PKG_BUILD" -name config.guess | sed 's/config.guess//'); do
printf "%${BUILD_INDENT}c $(print_color CLR_FIXCONFIG "FIXCONFIG") $config\n" ' '
build_msg "CLR_FIXCONFIG" "FIXCONFIG" "${config}"
[ -f "$config/config.guess" -a -f $TOOLCHAIN/configtools/config.guess ] && \
cp -f $TOOLCHAIN/configtools/config.guess $config