summaryrefslogtreecommitdiff
path: root/extract-files.sh
blob: 0056379c25b7aaa4d436eee505c83d097d4b2e4d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#!/bin/bash
#
# Copyright (C) 2016 The CyanogenMod Project
# Copyright (C) 2017-2020 The LineageOS Project
#
# SPDX-License-Identifier: Apache-2.0
#

function blob_fixup() {
    case "${1}" in
        vendor/lib/hw/fingerprint.goodix.so | vendor/lib64/hw/fingerprint.goodix.so)
            sed -i "s|\x00goodix.fingerprint\x00|\x00fingerprint\x00\x00\x00\x00\x00\x00\x00\x00|" "${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
fi

set -e

export DEVICE=dumpling
export DEVICE_COMMON=msm8998-common
export VENDOR=oneplus

"./../../${VENDOR}/${DEVICE_COMMON}/extract-files.sh" "$@"