diff --git a/extract-files.sh b/extract-files.sh index e73ecf0..22ca6ca 100755 --- a/extract-files.sh +++ b/extract-files.sh @@ -1,8 +1,7 @@ #!/bin/bash # -# Copyright (C) 2016 The CyanogenMod Project -# Copyright (C) 2017-2024 The LineageOS Project -# +# SPDX-FileCopyrightText: 2016 The CyanogenMod Project +# SPDX-FileCopyrightText: 2017-2024 The LineageOS Project # SPDX-License-Identifier: Apache-2.0 # @@ -33,18 +32,18 @@ SECTION= while [ "${#}" -gt 0 ]; do case "${1}" in -n | --no-cleanup ) - CLEAN_VENDOR=false - ;; + CLEAN_VENDOR=false + ;; -k | --kang ) - KANG="--kang" - ;; + KANG="--kang" + ;; -s | --section ) - SECTION="${2}"; shift - CLEAN_VENDOR=false - ;; + SECTION="${2}"; shift + CLEAN_VENDOR=false + ;; * ) - SRC="${1}" - ;; + SRC="${1}" + ;; esac shift done @@ -56,12 +55,23 @@ fi function blob_fixup() { case "${1}" in system/lib64/libcamera_algoup_jni.xiaomi.so|system/lib64/libcamera_mianode_jni.xiaomi.so) + [ "$2" = "" ] && return 0 "${PATCHELF}" --add-needed "libgui_shim_miuicamera.so" "${2}" ;; system/priv-app/MiuiCamera/MiuiCamera.apk) + [ "$2" = "" ] && return 0 split --bytes=49M -d "$2" "$2".part ;; + *) + return 1 + ;; esac + + return 0 +} + +function blob_fixup_dry() { + blob_fixup "$1" "" } if [ -z "$SRC" ]; then diff --git a/setup-makefiles.sh b/setup-makefiles.sh index e3de67c..bd733f7 100755 --- a/setup-makefiles.sh +++ b/setup-makefiles.sh @@ -1,8 +1,7 @@ #!/bin/bash # -# Copyright (C) 2016 The CyanogenMod Project -# Copyright (C) 2017-2024 The LineageOS Project -# +# SPDX-FileCopyrightText: 2016 The CyanogenMod Project +# SPDX-FileCopyrightText: 2017-2024 The LineageOS Project # SPDX-License-Identifier: Apache-2.0 #