From a831d3f1499adc4eb04e113fe6a2bf5eef6bd79f Mon Sep 17 00:00:00 2001 From: Ben Kohler Date: Tue, 8 Jan 2019 11:02:26 -0600 Subject: [PATCH] catalyst-auto-sparc64.conf: redo post_build modeled after ppc Signed-off-by: Ben Kohler --- tools/catalyst-auto-sparc64.conf | 36 +++++++++++++++++++------------- 1 file changed, 21 insertions(+), 15 deletions(-) diff --git a/tools/catalyst-auto-sparc64.conf b/tools/catalyst-auto-sparc64.conf index 570a0566..3a3e5f0e 100644 --- a/tools/catalyst-auto-sparc64.conf +++ b/tools/catalyst-auto-sparc64.conf @@ -46,22 +46,28 @@ update_symlinks() { done } +upload() { + rsync -e 'ssh -i /root/.ssh/id_rsa' + -a + --omit-dir-times + --delay-updates + "$@" + sparc@nightheron.gentoo.org: +} post_build() { - # We only want to do anything on the final (0 argument) post_build call - [ $# -eq 0 ] || return 0 + local set=$1 spec=$2 - mkdir -p ${TMPDIR}/empty - cmd=( - rsync - -e 'ssh -i /root/.ssh/id_rsa' - -a - --omit-dir-times - --delay-updates - ) - "${cmd[@]}" ${TMPDIR}/empty ${DEST} - "${cmd[@]}" \ - ${BUILD_SRCDIR_BASE}/default/stage3-*${DATESTAMP}*${EXTENSIONS}* \ - ${BUILD_SRCDIR_BASE}/default/*${DATESTAMP}*.iso* \ - sparc@nightheron.gentoo.org: + pushd "${BUILD_SRCDIR_BASE}/default/" > /dev/null + + case ${spec} in + stage3.spec + upload stage3-*${DATESTAMP}*${EXTENSIONS}* + ;; + installcd-stage2-minimal.spec + upload *${DATESTAMP}*.iso* + ;; + esac + + popd > /dev/null }