From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id 5CCC459CA5 for ; Sun, 20 Mar 2016 22:39:50 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id D431B21C08E; Sun, 20 Mar 2016 22:39:49 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 7D18C21C08E for ; Sun, 20 Mar 2016 22:39:49 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id A384B340961 for ; Sun, 20 Mar 2016 22:39:48 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 769D8822 for ; Sun, 20 Mar 2016 22:39:46 +0000 (UTC) From: "Mike Frysinger" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Mike Frysinger" Message-ID: <1458508247.a1b63fb90eddf827e465205f1f853236032ba2e3.vapier@gentoo> Subject: [gentoo-commits] proj/releng:master commit in: scripts/ X-VCS-Repository: proj/releng X-VCS-Files: scripts/copy_buildsync.sh X-VCS-Directories: scripts/ X-VCS-Committer: vapier X-VCS-Committer-Name: Mike Frysinger X-VCS-Revision: a1b63fb90eddf827e465205f1f853236032ba2e3 X-VCS-Branch: master Date: Sun, 20 Mar 2016 22:39:46 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: 673f401e-9cc7-4d4c-8e83-95f7e163ac89 X-Archives-Hash: 17dbdb3790a7433b191871baab139ac6 commit: a1b63fb90eddf827e465205f1f853236032ba2e3 Author: Mike Frysinger gentoo org> AuthorDate: Sun Mar 20 21:10:47 2016 +0000 Commit: Mike Frysinger gentoo org> CommitDate: Sun Mar 20 21:10:47 2016 +0000 URL: https://gitweb.gentoo.org/proj/releng.git/commit/?id=a1b63fb9 copy_buildsync.sh: convert code to use funcs This makes the code a bit easier to follow and break up. scripts/copy_buildsync.sh | 29 +++++++++++++++++++++++++++-- 1 file changed, 27 insertions(+), 2 deletions(-) diff --git a/scripts/copy_buildsync.sh b/scripts/copy_buildsync.sh index 6105197..a9c18a0 100755 --- a/scripts/copy_buildsync.sh +++ b/scripts/copy_buildsync.sh @@ -34,7 +34,21 @@ VERBOSEP= [ -n "$VERBOSE" ] && RSYNC_OPTS+=( -v ) [ -n "$VERBOSEP" ] && VERBOSEP="-v" -for ARCH in "${ARCHES[@]}"; do +usage() { + cat <&2 fi +} -done +main() { + if [[ $# -ne 0 ]]; then + usage + fi + + local arch + for arch in "${ARCHES[@]}"; do + process_arch "${arch}" + done +} +main "$@" # vim:ts=2 sw=2 noet ft=sh: