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 5D26159CA5 for ; Sun, 20 Mar 2016 23:53:30 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 52CFC21C00A; Sun, 20 Mar 2016 23:53:28 +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 804BC21C00A for ; Sun, 20 Mar 2016 23:53:27 +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 6FB74340A99 for ; Sun, 20 Mar 2016 23:53:26 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id EAEAB862 for ; Sun, 20 Mar 2016 23:53:23 +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: <1458517064.62f25f4995cb2a7b37a4bce84bb781a9451d8e70.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: 62f25f4995cb2a7b37a4bce84bb781a9451d8e70 X-VCS-Branch: master Date: Sun, 20 Mar 2016 23:53:23 +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: e23e3b50-b731-4ec8-8343-7c45dbdd2b61 X-Archives-Hash: 4c6e2b57ac7566c5732e1d76393a9bcb commit: 62f25f4995cb2a7b37a4bce84bb781a9451d8e70 Author: Mike Frysinger gentoo org> AuthorDate: Sun Mar 20 23:37:44 2016 +0000 Commit: Mike Frysinger gentoo org> CommitDate: Sun Mar 20 23:37:44 2016 +0000 URL: https://gitweb.gentoo.org/proj/releng.git/commit/?id=62f25f49 copy_buildsync.sh: fix extension handling The change to use a list of file extensions w/find doesn't actually work: the [] operators sets up a group of chars to match, and it isn't split by the comma char. It's equiv to doing "*[,.2abfgrstxz]". scripts/copy_buildsync.sh | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/scripts/copy_buildsync.sh b/scripts/copy_buildsync.sh index 1d45921..ac823fe 100755 --- a/scripts/copy_buildsync.sh +++ b/scripts/copy_buildsync.sh @@ -24,7 +24,16 @@ RSYNC_OPTS=( -aO --delay-updates ) -EXTENSIONS="[.tar.xz,.tar.bz2,.tar.gz,.tar,.sfs]" +# Command line for `find` to figure out what files are release artifacts. +EXTENSIONS=( + '(' + -name '*.tar.xz' -o + -name '*.tar.bz2' -o + -name '*.tar.gz' -o + -name '*.tar' -o + -name '*.sfs' + ')' +) OUT_STAGE3="latest-stage3.txt" OUT_ISO="latest-iso.txt" @@ -101,7 +110,7 @@ process_arch() { # %T@ iso_list="$(find 20* -name '*.iso' -printf '%h %f %h/%f\n' |grep -v hardened | sort -n)" - stage3_list=$(find 20* -name "stage3*${EXTENSIONS}" -printf '%h %f %h/%f\n' | grep -v hardened | sort -n) + stage3_list=$(find 20* -name "stage3*" -a "${EXTENSIONS[@]}" -printf '%h %f %h/%f\n' | grep -v hardened | sort -n) latest_iso_date="$(echo -e "${iso_list}" |awk '{print $1}' |cut -d/ -f1 | tail -n1)" latest_stage3_date="$(echo -e "${stage3_list}" |awk '{print $1}' |cut -d/ -f1 | tail -n1)" header="$(echo -e "# Latest as of $(date -uR)\n# ts=$(date -u +%s)")" @@ -144,10 +153,10 @@ process_arch() { fi # New variant preserve code - variants=$(find 20* \( -iname '*.iso' -o -iname "*${EXTENSIONS}" \) -printf '%f\n' | sed -e 's,-20[012][0-9]\{5\}.*,,g' -r | sort | uniq) + variants=$(find 20* \( -iname '*.iso' -o "${EXTENSIONS[@]}" \) -printf '%f\n' | sed -e 's,-20[012][0-9]\{5\}.*,,g' -r | sort | uniq) echo -n '' >"${tmpdir}"/.keep.${ARCH}.txt for v in $variants ; do - variant_path=$(find 20* -iname "${v}-20*" \( -name "*${EXTENSIONS}" -o -iname '*.iso' \) -print | sed -e "s,.*/$a/autobuilds/,,g" | sort -k1,1 -t/ | tail -n1 ) + variant_path=$(find 20* -iname "${v}-20*" \( "${EXTENSIONS[@]}" -o -iname '*.iso' \) -print | sed -e "s,.*/$a/autobuilds/,,g" | sort -k1,1 -t/ | tail -n1 ) if [ -z "${variant_path}" -o ! -e "${variant_path}" ]; then echo "$ARCH: Variant ${v} is missing" 1>&2 continue