diff options
author | Lucio Andrés Illanes Albornoz (arab, vxp) <lucio@lucioillanes.de> | 2017-11-22 01:32:50 +0000 |
---|---|---|
committer | Lucio Andrés Illanes Albornoz (arab, vxp) <lucio@lucioillanes.de> | 2017-11-22 02:35:10 +0000 |
commit | 32ad217d197203a97dfcc0076e748731d2315c0b (patch) | |
tree | 1f4dd5799daa9ac8540cddcc45b4c1557cb0ac70 /subr/pkg_fetch_distclean.subr | |
parent | 465073d1a9f8ead60dbe66a26b55c0c1927e63c6 (diff) | |
download | midipix_build-32ad217d197203a97dfcc0076e748731d2315c0b.tar.bz2 midipix_build-32ad217d197203a97dfcc0076e748731d2315c0b.tar.xz |
subr/*: reorganised as {ex{,_{pkg,rtl,setup}},pkg}_*.
Diffstat (limited to 'subr/pkg_fetch_distclean.subr')
-rw-r--r-- | subr/pkg_fetch_distclean.subr | 15 |
1 files changed, 15 insertions, 0 deletions
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 |