mirror of
https://github.com/topjohnwu/Magisk
synced 2024-11-13 20:54:12 +01:00
Restore cwd
This commit is contained in:
parent
f63af0601c
commit
9e9f8ca8f3
@ -96,8 +96,10 @@ cpio_mkdir() {
|
||||
|
||||
[ -z $1 ] && abort_wrap "This script requires a boot image as a parameter"
|
||||
|
||||
cwd=`pwd`
|
||||
cd "`dirname_wrap $1`"
|
||||
BOOTIMAGE="`pwd`/`basename_wrap $1`"
|
||||
cd $cwd
|
||||
|
||||
[ -e "$BOOTIMAGE" ] || abort_wrap "$BOOTIMAGE does not exist!"
|
||||
|
||||
@ -110,7 +112,7 @@ 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}"`"
|
||||
chmod +x ./*
|
||||
chmod -R 755 .
|
||||
|
||||
##########################################################################################
|
||||
# Unpack
|
||||
|
Loading…
Reference in New Issue
Block a user