Lucio Andrés Illanes Albornoz 3e5303
#
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() {
Lucio Andrés Illanes Albornoz 3e5303
	local _dname="";
Lucio Andrés Illanes Albornoz 3e5303
Lucio Andrés Illanes Albornoz 3e5303
	if [ -n "${PKG_URLS_GIT:-}" ]; then
Lucio Andrés Illanes Albornoz 3e5303
		if [ -n "${PKG_SUBDIR:-}" ]\
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;
Lucio Andrés Illanes Albornoz 3e5303
		for _dname in ${PKG_URLS_GIT}; do
Lucio Andrés Illanes Albornoz 3e5303
			_dname="${_dname%%=*}"; rtl_fileop rm "${_dname}";
Lucio Andrés Illanes Albornoz 3e5303
		done;
Lucio Andrés Illanes Albornoz 3e5303
	elif [ -n "${PKG_SUBDIR}" ]; then
Lucio Andrés Illanes Albornoz 3e5303
		rtl_fileop rm "${PKG_SUBDIR}";
Lucio Andrés Illanes Albornoz 3e5303
	fi; return 0;
Lucio Andrés Illanes Albornoz 3e5303
};
Lucio Andrés Illanes Albornoz 3e5303
Lucio Andrés Illanes Albornoz 3e5303
# vim:filetype=sh