From 9c437a3d07aa73fd2887483365669c8a3f1bb647 Mon Sep 17 00:00:00 2001 From: Michael Bestas Date: Tue, 27 Aug 2024 22:51:30 +0300 Subject: [PATCH] sabrina: Sync extract scripts with templates Change-Id: I98a36854c5a0c0390592911bb2558b34eff77efc --- extract-files.sh | 14 ++++++++++++-- setup-makefiles.sh | 10 ++++++++-- 2 files changed, 20 insertions(+), 4 deletions(-) diff --git a/extract-files.sh b/extract-files.sh index 7a04680..859e924 100755 --- a/extract-files.sh +++ b/extract-files.sh @@ -1,7 +1,7 @@ #!/bin/bash # -# Copyright (C) 2016 The CyanogenMod Project -# Copyright (C) 2017-2020 The LineageOS Project +# SPDX-FileCopyrightText: 2016 The CyanogenMod Project +# SPDX-FileCopyrightText: 2017-2024 The LineageOS Project # # SPDX-License-Identifier: Apache-2.0 # @@ -10,9 +10,19 @@ function blob_fixup() { case "${1}" in # Use generic Light HAL context for led_control_service vendor/etc/init/led_control_service.rc) + [ "$2" = "" ] && return 0 sed -i "8d" "${2}" ;; + *) + return 1 + ;; esac + + return 0 +} + +function blob_fixup_dry() { + blob_fixup "$1" "" } # If we're being sourced by the common script that we called, diff --git a/setup-makefiles.sh b/setup-makefiles.sh index d542dbe..55d7d65 100755 --- a/setup-makefiles.sh +++ b/setup-makefiles.sh @@ -1,11 +1,17 @@ #!/bin/bash # -# Copyright (C) 2016 The CyanogenMod Project -# Copyright (C) 2017-2020 The LineageOS Project +# SPDX-FileCopyrightText: 2016 The CyanogenMod Project +# SPDX-FileCopyrightText: 2017-2024 The LineageOS Project # # SPDX-License-Identifier: Apache-2.0 # +# 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=sabrina -- 2.20.1