From 19ab706dac37932341aa743c982dd4cca9df4636 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: Sun, 10 Dec 2017 18:40:13 +0000 Subject: etc/build.usage, subr/build_args.subr: adds -C build[,dest[,src]] (clean subdirs) and -p (create package tarballs). subr/pkg_clean.subr: given -C, clean build, dest, and/or src. subr/pkg_install.subr: given -p, create gzip(1)-compressed package tarball at ${PKG_BASE_DIR}/${PKG_NAME}.tgz. vars/env.vars:${DEFAULT_BUILD_STEPS}: adds `clean' post-install. --- subr/build_args.subr | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'subr/build_args.subr') diff --git a/subr/build_args.subr b/subr/build_args.subr index 8bf668a4..34875047 100644 --- a/subr/build_args.subr +++ b/subr/build_args.subr @@ -8,8 +8,10 @@ BUILD_ARGS_SPEC=" ARCH:arg:-a: BUILD:arg:-b: ARG_CLEAN:-c: + ARG_CLEAN_BUILDS:arg:-C: ARG_DEBUG_MINIPIX:--debug-minipix: ARG_OFFLINE:-N: + ARG_PACKAGE:-p: ARG_PARALLEL:optarg:-P:auto ARG_RELAXED:-R: ARG_RESTART:arg:-r: @@ -57,7 +59,14 @@ build_args() { shift; fi; done; - if [ -n "${ARG_TARBALL}" ]; then + if [ -n "${ARG_CLEAN_BUILDS}" ]; then + ARG_CLEAN_BUILDS="$(echo "${ARG_CLEAN_BUILDS}" | sed "s/,/ /g")"; + fi; + if [ -n "${ARG_CLEAN_BUILDS}" ]\ + || [ "${ARG_PACKAGE:-0}" -eq 1 ]\ + && [ -n "${ARG_TARBALL}" ]; then + unset ARG_TARBALL; + elif [ -n "${ARG_TARBALL}" ]; then if [ "${ARG_TARBALL#-t.}" != "${ARG_TARBALL}" ]; then TARBALL_SUFFIX="${ARG_TARBALL#-t.}"; else @@ -78,7 +87,7 @@ build_args() { else ARG_RESTART_AT=ALL; fi; - ARG_RESTART="$(echo ${ARG_RESTART} | sed "s/,/ /g")"; + ARG_RESTART="$(echo "${ARG_RESTART}" | sed "s/,/ /g")"; fi; while [ ${#} -gt 0 ]; do case "${1}" in -- cgit v1.2.3