From 4e6544796ae3a4544e10eb0c40a463c1bcbac7d0 Mon Sep 17 00:00:00 2001 From: SinTan1729 Date: Wed, 12 Oct 2022 18:28:44 -0500 Subject: [PATCH] Make sure to work in the script directory --- build_revanced.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/build_revanced.sh b/build_revanced.sh index 47586cd..85fe645 100755 --- a/build_revanced.sh +++ b/build_revanced.sh @@ -17,7 +17,9 @@ else exit -1 fi -ODIR="$PWD" +# Make sure to work in the script directory +SDIR="$(dirname -- "$( readlink -f -- "$0"; )";)" +cd "$SDIR" # Get line numbers where included & excluded patches start from. # We rely on the hardcoded messages to get the line numbers using grep @@ -104,7 +106,7 @@ if [[ $flag == false && "$2" != "force" ]]; then fi # Download required apk files -/bin/bash "$ODIR/download_apkmirror.sh" "$WDIR" +"$SDIR/download_apkmirror.sh" "$WDIR" # Fetch microG chmod +x apkeep