From 3cce8b79a317b5b71da55a8af46c7ba00e9d9538 Mon Sep 17 00:00:00 2001 From: "W. Trevor King" Date: Wed, 29 Jan 2014 12:31:26 -0800 Subject: [PATCH] build.sh: Add [--help] {build|missing} support The 'missing' command show which repos remain unbuilt. I use this to setup the REPOS environtment variable for subsequent build calls, if on of the repos is giving me trouble. --- build.sh | 33 +++++++++++++++++++++++++++------ 1 file changed, 27 insertions(+), 6 deletions(-) diff --git a/build.sh b/build.sh index ecb77b6..78eb33b 100755 --- a/build.sh +++ b/build.sh @@ -199,10 +199,31 @@ build_repo() "${DOCKER}" tag -f "${NAMESPACE}/${REPO}:${DATE}" "${NAMESPACE}/${REPO}:latest" || die "failed to tag" } -import_stage3 -import_portage -extract_busybox +build() +{ + import_stage3 + import_portage + extract_busybox + + for REPO in ${REPOS}; do + build_repo "${REPO}" + done +} + +missing() +{ + for REPO in gentoo portage-import ${REPOS}; do + if ! repo_exists "${REPO}"; then + msg "${REPO}" + fi + done +} + +ACTION="${1:-build}" -for REPO in ${REPOS}; do - build_repo "${REPO}" -done +case "${ACTION}" in +build) build ;; +missing) missing ;; +--help) msg "usage: ${0} [--help] {build|missing}" ;; +*) die "invalid action '${ACTION}'" ;; +esac -- 2.26.2