Blame vars/invariants_zipdist.vars

Lucio Andrés Illanes Albornoz 36c4a8
#
Lucio Andrés Illanes Albornoz 36c4a8
# set -o errexit -o noglob are assumed.
Lucio Andrés Illanes Albornoz 36c4a8
#
Lucio Andrés Illanes Albornoz 36c4a8
Lucio Andrés Illanes Albornoz 36c4a8
pkg_invariants_zipdist_all() {
Lucio Andrés Illanes Albornoz d37735
	local _dist_fname="" _pkg_name="" _pkglist_fname="${PREFIX}/pkglist.native";
Lucio Andrés Illanes Albornoz 0eaee4
	if ex_rtl_lmatch "${ARG_DIST}" , zipdist; then
Lucio Andrés Illanes Albornoz 36c4a8
		ex_rtl_log_msg info "Building deployable distribution ZIP archive...";
Lucio Andrés Illanes Albornoz d37735
		for _pkg_name in $(cat "${_pkglist_fname}"); do
Lucio Andrés Illanes Albornoz d37735
			if ! stat "${BUILD_WORKDIR}/${_pkg_name}-native-${DEFAULT_TARGET}" >/dev/null 2>&1; then
Lucio Andrés Illanes Albornoz d37735
				ex_rtl_log_msg failexit "Error: missing package build directory for package \`${_pkg_name}'.";
Lucio Andrés Illanes Albornoz d37735
			fi;
Lucio Andrés Illanes Albornoz d37735
		done;
Lucio Andrés Illanes Albornoz 36c4a8
		_dist_fname="${DEFAULT_ZIPDIST_FNAME_PREFIX}${BUILD_USER}@${BUILD_HNAME}-${BUILD_DATE_START}.zip";
Lucio Andrés Illanes Albornoz d37735
		"${BUILD_WORKDIR}/mpackage/mpackage.sh"		\
Lucio Andrés Illanes Albornoz 36c4a8
			--defroot=/dev/fs/c/midipix		\
Lucio Andrés Illanes Albornoz 36c4a8
			--flysyms				\
Lucio Andrés Illanes Albornoz 36c4a8
			--minroot="${PREFIX_MINIPIX}"		\
Lucio Andrés Illanes Albornoz 36c4a8
			--objroot="${BUILD_WORKDIR}"		\
Lucio Andrés Illanes Albornoz 36c4a8
			--pkgroot="${BUILD_WORKDIR}/pkgroot"	\
Lucio Andrés Illanes Albornoz 36c4a8
			--product=Midipix			\
Lucio Andrés Illanes Albornoz d37735
			--subset="${_pkglist_fname}"		\
Lucio Andrés Illanes Albornoz 36c4a8
			--symbols				\
Lucio Andrés Illanes Albornoz 36c4a8
			--sysroot="${BUILD_WORKDIR}/sysroot"	\
Lucio Andrés Illanes Albornoz 36c4a8
			--target="${DEFAULT_TARGET}"		\
Lucio Andrés Illanes Albornoz 36c4a8
			--tmproot="${BUILD_WORKDIR}/tmproot"	\
Lucio Andrés Illanes Albornoz 36c4a8
			--zipfile="${PREFIX}/${_dist_fname}";
Lucio Andrés Illanes Albornoz 36c4a8
	fi;
Lucio Andrés Illanes Albornoz 36c4a8
};
Lucio Andrés Illanes Albornoz 36c4a8
Lucio Andrés Illanes Albornoz 36c4a8
# vim:filetype=sh