aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoshua Blanchard <joshua.lee.bbg@gmail.com>2020-10-24 10:08:46 -0400
committerJoshua Blanchard <joshua.lee.bbg@gmail.com>2020-11-08 09:48:19 -0500
commit008f6cab094861465c8df2e02853a704385202b1 (patch)
tree719e144fd1442444b0113203ec789c3cc8ef6a50
parente46ee50bb190401fae5fb465e923e0604606bfb9 (diff)
evert: Migrate to function blob_fixup() for patching blobs
Change-Id: I45e3454ecd8f5af17b00e6ad2b3001fc82190e88
-rwxr-xr-xextract-files.sh32
1 files changed, 16 insertions, 16 deletions
diff --git a/extract-files.sh b/extract-files.sh
index 770f14a..ad2cfee 100755
--- a/extract-files.sh
+++ b/extract-files.sh
@@ -15,19 +15,29 @@
# limitations under the License.
#
+function blob_fixup() {
+ case "${1}" in
+
+ # Load ZAF configs from vendor
+ vendor/lib/libzaf_core.so)
+ sed -i "s|/system/etc/zaf|/vendor/etc/zaf|g" "${2}"
+ ;;
+
+ # Add uhid group for fingerprint service
+ vendor/etc/init/android.hardware.biometrics.fingerprint@2.1-service.rc)
+ sed -i "s/input/uhid input/" "${2}"
+ ;;
+
+ esac
+}
+
# If we're being sourced by the common script that we called,
# 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
-LINEAGE_ROOT="$MY_DIR"/../../..
# Required!
export DEVICE=evert
@@ -37,13 +47,3 @@ export VENDOR=motorola
export DEVICE_BRINGUP_YEAR=2018
"./../../${VENDOR}/${DEVICE_COMMON}/extract-files.sh" "$@"
-
-BLOB_ROOT="$LINEAGE_ROOT"/vendor/"${VENDOR}"/"${DEVICE}"/proprietary
-
-# Load ZAF configs from vendor
-ZAF_CORE="$BLOB_ROOT"/vendor/lib/libzaf_core.so
-sed -i "s|/system/etc/zaf|/vendor/etc/zaf|g" "$ZAF_CORE"
-
-# Add uhid group for fingerprint service
-FP_SERVICE_RC="$BLOB_ROOT"/vendor/etc/init/android.hardware.biometrics.fingerprint@2.1-service.rc
-sed -i "s/input/uhid input/" "$FP_SERVICE_RC"