Lucio Andrés Illanes Albornoz 3e5303
#
8d7a8a
# Copyright (c) 2016, 2017, 2018, 2019, 2020, 2021, 2022, 2023 LucĂ­a Andrea Illanes Albornoz <lucia@luciaillanes.de>
Lucio Andrés Illanes Albornoz 3e5303
# set +o errexit -o noglob -o nounset is assumed.
Lucio Andrés Illanes Albornoz 3e5303
#
Lucio Andrés Illanes Albornoz 3e5303
Lucio Andrés Illanes Albornoz 3e5303
pkg_fetch_clean() {
e9fa07
	local	_pfc_group_name="${1}" _pfc_pkg_name="${2}" _pfc_restart_at="${3}"	\
e9fa07
		_pfc_dname="";
Lucio Andrés Illanes Albornoz 3e5303
e9fa07
	if [ "${PKG_URLS_GIT:+1}" = 1 ]; then
e9fa07
		if [ "${PKG_SUBDIR:+1}" = 1 ]\
Lucio Andrés Illanes Albornoz 3e5303
		&& [ "${PKG_SUBDIR}" != "${PKG_URLS_GIT%%=*}" ]; then
Lucio Andrés Illanes Albornoz b9a715
			rtl_fileop rm "${PKG_SUBDIR}";
Lucio Andrés Illanes Albornoz 3e5303
		fi;
e9fa07
e9fa07
		for _pfc_dname in ${PKG_URLS_GIT}; do
e9fa07
			_pfc_dname="${_pfc_dname%%=*}"; rtl_fileop rm "${_pfc_dname}";
Lucio Andrés Illanes Albornoz 3e5303
		done;
e9fa07
	elif [ "${PKG_SUBDIR:+1}" = 1 ]; then
Lucio Andrés Illanes Albornoz 3e5303
		rtl_fileop rm "${PKG_SUBDIR}";
e9fa07
	fi;
e9fa07
e9fa07
	return 0;
Lucio Andrés Illanes Albornoz 3e5303
};
Lucio Andrés Illanes Albornoz 3e5303
64844b
# vim:filetype=sh textwidth=0