summaryrefslogtreecommitdiffhomepage
path: root/subr/pkg_clean.subr
blob: d18adc132cd4e34bae7dcb9a3fb61e3b3ef1e13b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#
# set -o errexit -o noglob are assumed.
#

pkg_clean() {
	local _dir;
	for _dir in ${ARG_CLEAN_BUILDS}; do
		case "${_dir}" in
		build)	ex_rtl_fileop rm "${PKG_BUILD_DIR}"; ;;
		src)	ex_rtl_fileop rm "${PKG_SUBDIR}"; ;;
		dest)	ex_rtl_fileop rm "${PKG_DESTDIR}"; ;;
		*)	return 1; ;;
		esac;
	done;
};

# vim:filetype=sh