summaryrefslogtreecommitdiffhomepage
path: root/subr.pkg/pkg_install_subdirs.subr
blob: f36c4b6d4a8c84ef016bd9c849647b797d1be244 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#
# Copyright (c) 2016, 2017, 2018, 2019, 2020, 2021, 2022, 2023 Lucía Andrea Illanes Albornoz <lucia@luciaillanes.de>
# set +o errexit -o noglob -o nounset is assumed.
#

pkg_install_subdirs() {
	local	_pis_group_name="${1}" _pkg_name="${2}" _restart_at="${3}"	\
		_pis_gspec="";

	for _pis_gspec in 					\
			"${PKG_INSTALL_FILES_DESTDIR:-}"	\
			"${PKG_INSTALL_FILES_DESTDIR_EXTRA:-}"; do
		if ! rtl_install "${PKG_DESTDIR}" ${_pis_gspec}; then
			return 1;
		fi;
	done;

	if [ "${PKG_PREFIX%/}" = "${PREFIX_NATIVE%/}" ]; then
		if ! rtl_install "${PKG_DESTDIR}/${DEFAULT_TARGET}" ${PKG_INSTALL_FILES_DESTDIR}; then
			return 1;
		fi;
	fi;

	return 0;
};

# vim:filetype=sh textwidth=0