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

pkg_fetch_distclean() {
	if [ "$(stat -c %i "${PKG_BASE_DIR}")"	\
	!=   "$(stat -c %i "${WORKDIR}")" ]; then
		ex_build_fileop cd "${WORKDIR}";
		ex_build_fileop rm "${PKG_BASE_DIR}";
		ex_build_fileop mkdir "${PKG_BASE_DIR}";
		ex_build_fileop cd "${PKG_BASE_DIR}";
	fi;
};

# vim:filetype=sh