verify-permission: Fix relative paths
* Allows script to be run from outside its directory
This commit is contained in:
parent
ac9236535a
commit
99ffe4e102
@ -13,6 +13,7 @@
|
||||
|
||||
import errno
|
||||
from glob import glob
|
||||
import os
|
||||
import re
|
||||
import subprocess
|
||||
import sys
|
||||
@ -25,6 +26,11 @@ except ImportError:
|
||||
print('Please install the "requests" package via pip3.')
|
||||
exit(errno.ENOPKG)
|
||||
|
||||
# Change working directory to the location of this script
|
||||
# This fixes relative path references when calling this script from
|
||||
# outside of the directory containing it
|
||||
os.chdir(sys.path[0])
|
||||
|
||||
# Definitions for privileged permissions
|
||||
ANDROID_MANIFEST_XML = \
|
||||
'https://raw.githubusercontent.com/LineageOS/android_frameworks_base/lineage-19.0/core/res/AndroidManifest.xml'
|
||||
|
Loading…
Reference in New Issue
Block a user