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

pkg_clean() {
	local _dir="";
	if ex_rtl_lmatch "${ARG_CLEAN_BUILDS}" , build; then
		ex_rtl_fileop rm "${PKG_BUILD_DIR}";
	fi;
	if ex_rtl_lmatch "${ARG_CLEAN_BUILDS}" , dest; then
		ex_rtl_fileop rm "${PKG_DESTDIR}";
	fi;
	if ex_rtl_lmatch "${ARG_CLEAN_BUILDS}" , src; then
		ex_rtl_fileop rm "${PKG_BASE_DIR}/${PKG_SUBDIR}";
	fi;
};

# vim:filetype=sh