From owner-freebsd-ports@FreeBSD.ORG Mon Dec 1 19:02:15 2014 Return-Path: Delivered-To: freebsd-ports@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 614BC691 for ; Mon, 1 Dec 2014 19:02:15 +0000 (UTC) Received: from mail-wg0-f45.google.com (mail-wg0-f45.google.com [74.125.82.45]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id EFC93957 for ; Mon, 1 Dec 2014 19:02:14 +0000 (UTC) Received: by mail-wg0-f45.google.com with SMTP id b13so15044106wgh.32 for ; Mon, 01 Dec 2014 11:02:07 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:content-type; bh=uovXBAcLUxuKyNsLuXgRwcu3tYQzT0cTOujIFGPcIY8=; b=cpSi7B23pPr4hOBcZU1G/EwzQLiN+f/fId3t3KC2xLlI42KSB5VED0zfcL4wrRMHPD TeUVw1W5jSAuUmgxsXAe5/QlO6K+8LLqjtU/5IalnAnkVvOMXAHiC3NlmhXjjkUO1ix3 /RU3x+0LYNNQBSrAcZ4dCYvwK4rmUl/goaZCnPY7x8fawCAOA1uOm8axNZJAmSC9hX9R KCM4sRt4wtg7ifHQEB3LJjQFPHHv4yBJWLBV4F6k+uth471yOA7wCSHC42ilxWkoGjU9 4u7svcqxyBfaiBZ3dTf1c2YoA2nKoCPRkh+7WOiQ/chdlt5XLb9i+SQSFVfrSLncYeMr OTDg== X-Gm-Message-State: ALoCoQkWiTkEykPrvp+IrA9O178tjARGgN4uvLxIBt/MBWMixXRA8A6XQ6F45unGV/864I2kUn8r MIME-Version: 1.0 X-Received: by 10.180.91.193 with SMTP id cg1mr4802106wib.26.1417460527027; Mon, 01 Dec 2014 11:02:07 -0800 (PST) Received: by 10.180.74.241 with HTTP; Mon, 1 Dec 2014 11:02:06 -0800 (PST) In-Reply-To: <547C4935.9060607@freebsd.org> References: <547AF3AE.5050803@gmx.net> <547C4935.9060607@freebsd.org> Date: Mon, 1 Dec 2014 12:02:06 -0700 Message-ID: Subject: Re: Tracking Binary Ports/Pkgs Tree From: "Reed A. Cartwright" To: Stefan Esser , freebsd-ports@freebsd.org Content-Type: text/plain; charset=UTF-8 X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Dec 2014 19:02:15 -0000 The attachment was stripped, so I created a gist. https://gist.github.com/reedacartwright/8622973baf89b263a6d7 #!/bin/sh # Copyright (c) 2014 Reed A. Cartwright # # This script determines the revision number used to build FreeBSD packages # and syncs a local ports directory to match it. # # USAGE: sync_local_ports.sh [name or abs_path] # # Requirements: textproc/jq, ports-mgmt/poudriere SERVER=beefy2.isc.freebsd.org JAIL=10amd64-default URL="http://${SERVER}/data/${JAIL}/.data.json" PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin PORTSTREE=$1 if [ -z "$PORTSTREE" ]; then PORTSTREE="default" fi # If the argument is not an absolute path, use poudriere to resolve it. # We test for absolute path by seeing if it begins with a slash. if [ "${PORTSTREE#/}" != "${PORTSTREE}" ]; then PORTSDIR="${PORTSTREE}" else PORTSDIR=`poudriere ports -ql | awk "\\\$1 == \"${PORTSTREE}\" { print \\\$3 }"` fi if [ ! -d "${PORTSDIR}" ]; then >&2 echo "ERROR: Unable to resolve ports tree '${PORTSTREE}' to a directory." exit 1 fi JSON=`fetch -qo - $URL` if [ $? -gt 0 ]; then >&2 echo "ERROR: Unable to fetch data from package server." exit 1 fi REV=`echo "${JSON}" | jq -r '.builds[.builds.latest].svn_url | split("@")[1]'` if expr "$REV" : '^[[:digit:]][[:digit:]]*$' >/dev/null; then svnlite up -r "${REV}" "${PORTSDIR}" else >& echo "ERROR: Unable to determine revision number for latest packages." fi On Mon, Dec 1, 2014 at 3:55 AM, Stefan Esser wrote: > Am 01.12.2014 um 08:55 schrieb Reed A. Cartwright: >> I turned my one liner into a script. I've attached it; hopefully, it >> will not be stripped. > > > Hi Reed, > > it has been stripped ;-) > > Please resend with your script inline, not attached. > > (There are mime-types that are not stripped by the mail-list > processor, but I forgot which types that are ...) > > Regards, STefan -- Reed A. Cartwright, PhD Barrett Honors Faculty Assistant Professor of Genomics, Evolution, and Bioinformatics School of Life Sciences Center for Evolutionary Medicine and Informatics The Biodesign Institute Arizona State University ================== Address: The Biodesign Institute, PO Box 875301, Tempe, AZ 85287-5301 USA Packages: The Biodesign Institute, 1001 S. McAllister Ave, Tempe, AZ 85287-5301 USA Office: Biodesign A-224A, 1-480-965-9949 Website: http://cartwrig.ht/