From 590e7f7724ab3e54bb812fc8fbf34be928c26606 Mon Sep 17 00:00:00 2001 From: topjohnwu Date: Fri, 15 Sep 2017 18:02:25 +0800 Subject: [PATCH] Proper support for Magisk Manager installation --- scripts/boot_patch.sh | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/scripts/boot_patch.sh b/scripts/boot_patch.sh index 22d520bc4..c49000707 100644 --- a/scripts/boot_patch.sh +++ b/scripts/boot_patch.sh @@ -110,8 +110,15 @@ cd $cwd # Detect whether running as root id | grep "uid=0" >/dev/null 2>&1 && ROOT=true || ROOT=false -# Switch to the location of the script file -[ -z $SOURCEDMODE ] && cd "`dirname_wrap "${BASH_SOURCE:-$0}"`" +if [ -z $SOURCEDMODE ]; then + # Switch to the location of the script file + cd "`dirname_wrap "${BASH_SOURCE:-$0}"`" + # Load utility functions + . ./util_functions.sh + # Detect current status + mount_partitions +fi + chmod -R 755 . ##########################################################################################