aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoshua Blanchard <joshua.lee.bbg@gmail.com>2020-07-20 18:17:07 -0400
committerJoshua Blanchard <joshua.lee.bbg@gmail.com>2020-09-17 07:38:59 -0400
commit15c6f401ac67a826b9a9b263902b13edeeafd71e (patch)
treebc442e5443a98eecd4e3e71d982f7d74c1975bf3
parent4377780dfc59fb2e0873141f452642b00841cefb (diff)
evert: set path for $MY_DIR in extract scripts
Without setting $MY_DIR variable, patching blobs would fail as the incorrect path would be set for LINEAGE_ROOT. This is a fixup of commit: 7706de03489be51b800c3387ae21416dee56042b Change-Id: Ib7d07f87bad3786aedcf8948419255d27aae07ce
-rwxr-xr-xextract-files.sh7
1 files changed, 6 insertions, 1 deletions
diff --git a/extract-files.sh b/extract-files.sh
index e4f082c..770f14a 100755
--- a/extract-files.sh
+++ b/extract-files.sh
@@ -19,6 +19,11 @@
# stop right here. No need to go down the rabbit hole.
if [ "${BASH_SOURCE[0]}" != "${0}" ]; then
return
+else
+ MY_DIR="${BASH_SOURCE%/*}"
+ if [ ! -d "${MY_DIR}" ]; then
+ MY_DIR="${PWD}"
+ fi
fi
set -e
@@ -33,7 +38,7 @@ export DEVICE_BRINGUP_YEAR=2018
"./../../${VENDOR}/${DEVICE_COMMON}/extract-files.sh" "$@"
-BLOB_ROOT="$LINEAGE_ROOT"/vendor/"$VENDOR"/"$DEVICE"/proprietary
+BLOB_ROOT="$LINEAGE_ROOT"/vendor/"${VENDOR}"/"${DEVICE}"/proprietary
# Load ZAF configs from vendor
ZAF_CORE="$BLOB_ROOT"/vendor/lib/libzaf_core.so