Blame subr/pkg_clean.subr

Lucio Andrés Illanes Albornoz (arab, vxp) 19ab70
#
Lucio Andrés Illanes Albornoz (arab, vxp) 19ab70
# set -o errexit -o noglob are assumed.
Lucio Andrés Illanes Albornoz (arab, vxp) 19ab70
#
Lucio Andrés Illanes Albornoz (arab, vxp) 19ab70
Lucio Andrés Illanes Albornoz (arab, vxp) 19ab70
pkg_clean() {
Lucio Andrés Illanes Albornoz 907bd3
	local _dir="";
Lucio Andrés Illanes Albornoz (arab, vxp) 4cc1cf
	if [ -n "${PKG_DEPS_BASE}" ]; then
Lucio Andrés Illanes Albornoz (arab, vxp) 4cc1cf
		return 0;
Lucio Andrés Illanes Albornoz (arab, vxp) 4cc1cf
	fi;
Lucio Andrés Illanes Albornoz (arab, vxp) 19ab70
	for _dir in ${ARG_CLEAN_BUILDS}; do
Lucio Andrés Illanes Albornoz (arab, vxp) 19ab70
		case "${_dir}" in
Lucio Andrés Illanes Albornoz (arab, vxp) 19ab70
		build)	ex_rtl_fileop rm "${PKG_BUILD_DIR}"; ;;
Lucio Andrés Illanes Albornoz (arab, vxp) 032233
		src)	ex_rtl_fileop rm "${PKG_BASE_DIR}/${PKG_SUBDIR}"; ;;
Lucio Andrés Illanes Albornoz (arab, vxp) 19ab70
		dest)	ex_rtl_fileop rm "${PKG_DESTDIR}"; ;;
Lucio Andrés Illanes Albornoz (arab, vxp) 19ab70
		*)	return 1; ;;
Lucio Andrés Illanes Albornoz (arab, vxp) 19ab70
		esac;
Lucio Andrés Illanes Albornoz (arab, vxp) 19ab70
	done;
Lucio Andrés Illanes Albornoz (arab, vxp) 19ab70
};
Lucio Andrés Illanes Albornoz (arab, vxp) 19ab70
Lucio Andrés Illanes Albornoz (arab, vxp) 19ab70
# vim:filetype=sh