From a8892f890ad30e02c126476a37bbc355748d5992 Mon Sep 17 00:00:00 2001 From: Leonid Pliushch Date: Fri, 30 Oct 2020 22:28:44 +0200 Subject: [PATCH] termux_step_patch_package.sh: handle new variables --- scripts/build/termux_step_patch_package.sh | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/scripts/build/termux_step_patch_package.sh b/scripts/build/termux_step_patch_package.sh index b13b53cb9..424e78bc1 100644 --- a/scripts/build/termux_step_patch_package.sh +++ b/scripts/build/termux_step_patch_package.sh @@ -11,10 +11,13 @@ termux_step_patch_package() { shopt -s nullglob for patch in $TERMUX_PKG_BUILDER_DIR/*.patch{$TERMUX_ARCH_BITS,} $DEBUG_PATCHES; do echo "Applying patch: $(basename $patch)" - test -f "$patch" && sed "s%\@TERMUX_PREFIX\@%${TERMUX_PREFIX}%g" "$patch" | \ - sed "s%\@TERMUX_HOME\@%${TERMUX_ANDROID_HOME}%g" | \ - sed "s%\@TERMUX_APP_PACKAGE\@%${TERMUX_APP_PACKAGE}%g" | \ - patch --silent -p1 + test -f "$patch" && sed \ + -e "s%\@TERMUX_APP_PACKAGE\@%${TERMUX_APP_PACKAGE}%g" \ + -e "s%\@TERMUX_BASE_DIR\@%${TERMUX_BASE_DIR}%g" \ + -e "s%\@TERMUX_CACHE_DIR\@%${TERMUX_CACHE_DIR}%g" \ + -e "s%\@TERMUX_HOME\@%${TERMUX_ANDROID_HOME}%g" \ + -e "s%\@TERMUX_PREFIX\@%${TERMUX_PREFIX}%g" \ + "$patch" | patch --silent -p1 done shopt -u nullglob fi