From 089575ae899cda658eac56b318abb183347fc7e4 Mon Sep 17 00:00:00 2001 From: LuK1337 Date: Tue, 15 Oct 2024 22:12:50 +0200 Subject: [PATCH] akatsuki: Switch to py extract utils Change-Id: I385df1ce3d67b291c7b6a543cb6581d2fc60b443 --- extract-files.py | 26 ++++++++++++++++++++++++++ extract-files.sh | 21 --------------------- setup-makefiles.py | 1 + setup-makefiles.sh | 15 --------------- 4 files changed, 27 insertions(+), 36 deletions(-) create mode 100755 extract-files.py delete mode 100755 extract-files.sh create mode 100755 setup-makefiles.py delete mode 100755 setup-makefiles.sh diff --git a/extract-files.py b/extract-files.py new file mode 100755 index 0000000..cbdd9b9 --- /dev/null +++ b/extract-files.py @@ -0,0 +1,26 @@ +#!/usr/bin/env -S PYTHONPATH=../../../tools/extract-utils python3 +# +# SPDX-FileCopyrightText: 2024 The LineageOS Project +# SPDX-License-Identifier: Apache-2.0 +# + +from extract_utils.main import ( + ExtractUtils, + ExtractUtilsModule, +) + +namespace_imports = [ + 'vendor/sony/tama-common', +] + +module = ExtractUtilsModule( + 'akatsuki', + 'sony', + namespace_imports=namespace_imports, +) + +if __name__ == '__main__': + utils = ExtractUtils.device_with_common( + module, 'tama-common', module.vendor + ) + utils.run() diff --git a/extract-files.sh b/extract-files.sh deleted file mode 100755 index a034e45..0000000 --- a/extract-files.sh +++ /dev/null @@ -1,21 +0,0 @@ -#!/bin/bash -# -# Copyright (C) 2016 The CyanogenMod Project -# Copyright (C) 2017-2020 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=akatsuki -export DEVICE_COMMON=tama-common -export VENDOR=sony - -"./../../${VENDOR}/${DEVICE_COMMON}/extract-files.sh" "$@" diff --git a/setup-makefiles.py b/setup-makefiles.py new file mode 100755 index 0000000..32947cf --- /dev/null +++ b/setup-makefiles.py @@ -0,0 +1 @@ +#!./extract-files.py --regenerate_makefiles diff --git a/setup-makefiles.sh b/setup-makefiles.sh deleted file mode 100755 index 8590178..0000000 --- a/setup-makefiles.sh +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/bash -# -# Copyright (C) 2016 The CyanogenMod Project -# Copyright (C) 2017-2020 The LineageOS Project -# -# SPDX-License-Identifier: Apache-2.0 -# - -set -e - -export DEVICE=akatsuki -export DEVICE_COMMON=tama-common -export VENDOR=sony - -"./../../${VENDOR}/${DEVICE_COMMON}/setup-makefiles.sh" "$@"