From owner-svn-src-vendor@freebsd.org Thu Mar 17 03:26:47 2016 Return-Path: Delivered-To: svn-src-vendor@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E973EAD328F; Thu, 17 Mar 2016 03:26:47 +0000 (UTC) (envelope-from obrien@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A8CF4152E; Thu, 17 Mar 2016 03:26:47 +0000 (UTC) (envelope-from obrien@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u2H3QkZg035133; Thu, 17 Mar 2016 03:26:46 GMT (envelope-from obrien@FreeBSD.org) Received: (from obrien@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u2H3QktE035132; Thu, 17 Mar 2016 03:26:46 GMT (envelope-from obrien@FreeBSD.org) Message-Id: <201603170326.u2H3QktE035132@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: obrien set sender to obrien@FreeBSD.org using -f From: "David E. O'Brien" Date: Thu, 17 Mar 2016 03:26:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r296977 - vendor/Juniper/libxo X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: SVN commit messages for the vendor work area tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 17 Mar 2016 03:26:48 -0000 Author: obrien Date: Thu Mar 17 03:26:46 2016 New Revision: 296977 URL: https://svnweb.freebsd.org/changeset/base/296977 Log: Give Phil and easy to use import script. Added: vendor/Juniper/libxo/import.sh - copied unchanged from r296976, vendor/NetBSD/bmake/import.sh Copied: vendor/Juniper/libxo/import.sh (from r296976, vendor/NetBSD/bmake/import.sh) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/Juniper/libxo/import.sh Thu Mar 17 03:26:46 2016 (r296977, copy of r296976, vendor/NetBSD/bmake/import.sh) @@ -0,0 +1,86 @@ +: +# $FreeBSD$ + +# "global" vars +ECHO= +# Set SVN variables +# select the local subversion site +SVN=${SVN:-/usr/local/bin/svn} + +# For consistency... +Error() { + echo ERROR: ${1+"$@"} >&2 + exit 1 +} + +Cd() { + [ $# -eq 1 ] || Error "Cd() takes a single parameter." + cd $1 || Error "cannot \"cd $1\" from $PWD" +} + +# Call this function and then follow it by any specific import script additions +option_parsing() { + local _shift=$# + # Parse command line options + while : + do + case "$1" in + *=*) eval "$1"; shift;; + --) shift; break;; + -a) TARBALL=$2; shift 2;; + -n) ECHO=echo; shift;; + -P) PR=$2; shift 2;; + -r) REVIEWER=$2; shift 2;; + -u) url=$2; shift 2;; + -h) echo "Usage:"; + echo " "$0 '[-ahnPr] [TARBALL=] [PR=] [REVIEWER=]' + echo " "$0 '-a # (a)rchive' + echo " "$0 '-h # print usage' + echo " "$0 '-n # do not import, check only.' + echo " "$0 '-P # Use PR' + echo " "$0 '-r # (r)eviewed by' + echo " "$0 'PR=' + echo " "$0 'REVIEWER=' + exit 1;; + *) break;; + esac + done + return $(($_shift - $#)) +} + +### + +option_parsing "$@" +shift $? + +TF=/tmp/.$USER.$$ +Cd `dirname $0` +test -s ${TARBALL:-/dev/null} || Error need TARBALL +here=`pwd` +# thing should match what the TARBALL contains +thing=`basename $here` + +rm -rf $thing +tar zxf $TARBALL + +# steps unique to bmake +VERSION=`grep '^MAKE_VERSION' bmake/Makefile | sed 's,.*=[[:space:]]*,,'` +rm -rf bmake/missing + +# the rest should be common +('cd' dist && $SVN list -R) | grep -v '/$' | sort > $TF.old +('cd' $thing && find . -type f ) | cut -c 3- | sort > $TF.new +comm -23 $TF.old $TF.new > $TF.rmlist +comm -13 $TF.old $TF.new > $TF.addlist +[ -s $TF.rmlist ] && { echo rm:; cat $TF.rmlist; } +[ -s $TF.addlist ] && { echo add:; cat $TF.addlist; } +('cd' $thing && tar cf - . | tar xf - -C ../dist) +('cd' dist +test -s $TF.rmlist && xargs $SVN rm < $TF.rmlist +test -s $TF.addlist && xargs $SVN --parents add < $TF.addlist +) + +url=`$SVN info | sed -n '/^URL:/s,URL: ,,p'` +echo After committing dist... run tag.sh +echo "$SVN cp $url/dist $url/$VERSION" > tag.sh +