From 1428651ab6c32df921abc05a366da251b05fcdf7 Mon Sep 17 00:00:00 2001 From: Michael Bestas Date: Tue, 27 Aug 2024 22:51:30 +0300 Subject: [PATCH] rtwo: Sync extract scripts with templates Change-Id: I98a36854c5a0c0390592911bb2558b34eff77efc --- extract-files.sh | 7 ++++--- setup-makefiles.sh | 13 ++++++++++--- 2 files changed, 14 insertions(+), 6 deletions(-) diff --git a/extract-files.sh b/extract-files.sh index ac32d0d..b488f1b 100755 --- a/extract-files.sh +++ b/extract-files.sh @@ -1,7 +1,7 @@ #!/bin/bash # -# Copyright (C) 2016 The CyanogenMod Project -# Copyright (C) 2017-2022 The LineageOS Project +# SPDX-FileCopyrightText: 2016 The CyanogenMod Project +# SPDX-FileCopyrightText: 2017-2024 The LineageOS Project # # SPDX-License-Identifier: Apache-2.0 # @@ -17,5 +17,6 @@ set -e export DEVICE=rtwo export DEVICE_COMMON=sm8550-common export VENDOR=motorola +export VENDOR_COMMON=${VENDOR} -"./../../${VENDOR}/${DEVICE_COMMON}/extract-files.sh" "$@" +"./../../${VENDOR_COMMON}/${DEVICE_COMMON}/extract-files.sh" "$@" diff --git a/setup-makefiles.sh b/setup-makefiles.sh index c04daae..73fac26 100755 --- a/setup-makefiles.sh +++ b/setup-makefiles.sh @@ -1,15 +1,22 @@ #!/bin/bash # -# Copyright (C) 2016 The CyanogenMod Project -# Copyright (C) 2017-2022 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=rtwo export DEVICE_COMMON=sm8550-common export VENDOR=motorola +export VENDOR_COMMON=${VENDOR} -"./../../${VENDOR}/${DEVICE_COMMON}/setup-makefiles.sh" "$@" +"./../../${VENDOR_COMMON}/${DEVICE_COMMON}/setup-makefiles.sh" "$@"