summaryrefslogtreecommitdiffhomepage
path: root/subr/pkg_clean.subr
diff options
context:
space:
mode:
Diffstat (limited to 'subr/pkg_clean.subr')
-rw-r--r--subr/pkg_clean.subr17
1 files changed, 17 insertions, 0 deletions
diff --git a/subr/pkg_clean.subr b/subr/pkg_clean.subr
new file mode 100644
index 00000000..d18adc13
--- /dev/null
+++ b/subr/pkg_clean.subr
@@ -0,0 +1,17 @@
+#
+# set -o errexit -o noglob are assumed.
+#
+
+pkg_clean() {
+ local _dir;
+ for _dir in ${ARG_CLEAN_BUILDS}; do
+ case "${_dir}" in
+ build) ex_rtl_fileop rm "${PKG_BUILD_DIR}"; ;;
+ src) ex_rtl_fileop rm "${PKG_SUBDIR}"; ;;
+ dest) ex_rtl_fileop rm "${PKG_DESTDIR}"; ;;
+ *) return 1; ;;
+ esac;
+ done;
+};
+
+# vim:filetype=sh