Files
build/lib/functions/bsp/utils-bsp.sh
Igor Pečovnik b7b8eb7b72 Add / modify (c) in bash scripts (#4922)
* Add / modify (c) in bash scripts

Signed-off-by: Igor <igor@armbian.com>

* Add (c) to the source config files

---------

Signed-off-by: Igor <igor@armbian.com>
2023-03-09 18:30:40 +01:00

33 lines
1.1 KiB
Bash

#!/usr/bin/env bash
#
# SPDX-License-Identifier: GPL-2.0
#
# Copyright (c) 2013-2023 Igor Pecovnik, igor@armbian.com
#
# This file is a part of the Armbian Build Framework
# https://github.com/armbian/build/
# copy_all_packages_files_for <folder> to package
copy_all_packages_files_for() {
local package_name="${1}"
# @TODO: rpardini: this was recovered after being assassinated by some insane person who rewrote aggregation in Python
declare PACKAGES_SEARCH_ROOT_ABSOLUTE_DIRS="
${SRC}/packages
${SRC}/config/optional/_any_board/_packages
${SRC}/config/optional/architectures/${ARCH}/_packages
${SRC}/config/optional/families/${LINUXFAMILY}/_packages
${SRC}/config/optional/boards/${BOARD}/_packages
"
for package_src_dir in ${PACKAGES_SEARCH_ROOT_ABSOLUTE_DIRS}; do
local package_dirpath="${package_src_dir}/${package_name}"
if [ -d "${package_dirpath}" ]; then
display_alert "Adding found files" "${package_dirpath} for '${package_name}'" "debug"
run_host_command_logged cp -r "${package_dirpath}/"* "${destination}/"
else
display_alert "No files found in" "${package_dirpath} for '${package_name}'" "debug"
fi
done
}