From 32ad217d197203a97dfcc0076e748731d2315c0b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lucio=20Andr=C3=A9s=20Illanes=20Albornoz=20=28arab=2C=20vx?= =?UTF-8?q?p=29?= Date: Wed, 22 Nov 2017 01:32:50 +0000 Subject: subr/*: reorganised as {ex{,_{pkg,rtl,setup}},pkg}_*. --- subr/pkg_fetch_distclean.subr | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 subr/pkg_fetch_distclean.subr (limited to 'subr/pkg_fetch_distclean.subr') diff --git a/subr/pkg_fetch_distclean.subr b/subr/pkg_fetch_distclean.subr new file mode 100644 index 00000000..19f0b741 --- /dev/null +++ b/subr/pkg_fetch_distclean.subr @@ -0,0 +1,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 -- cgit v1.2.3