Skip to content

Commit

Permalink
miuicamera: Sync extract scripts with templates
Browse files Browse the repository at this point in the history
Change-Id: I98a36854c5a0c0390592911bb2558b34eff77efc
  • Loading branch information
mikeNG authored and rayavanindra committed Oct 10, 2024
1 parent 865b302 commit e5675cb
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 15 deletions.
34 changes: 22 additions & 12 deletions extract-files.sh
Original file line number Diff line number Diff line change
@@ -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
#

Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down
5 changes: 2 additions & 3 deletions setup-makefiles.sh
Original file line number Diff line number Diff line change
@@ -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
#

Expand Down

0 comments on commit e5675cb

Please sign in to comment.