summaryrefslogtreecommitdiffhomepage
path: root/subr/pkg_configure_clean.subr
blob: 48549a90a690b881aa551f23368d87e29c32b9ca (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#
# set +o errexit -o noglob -o nounset is assumed.
#

pkg_configure_clean() {
	local _group_name="${1}" _pkg_name="${2}" _restart_at="${3}";

	if ex_pkg_state_test									\
			"${_pkg_name}"								\
			"configure_patch_pre,configure_autotools,configure_patch,configure"	\
			"${_restart_at}"; then
		if [ "${PKG_BUILD_DIR:-}" != "${PKG_SUBDIR:-}" ]; then
			rtl_fileop rm "${PKG_BUILD_DIR}" || return 1;
			rtl_fileop mkdir "${PKG_BUILD_DIR}" || return 1;
			rtl_fileop cd "${PKG_BUILD_DIR}" || return 1;
		fi;
	fi;
};

# vim:filetype=sh