Date: Sun, 3 Feb 2013 09:51:29 +0000 (UTC) From: Chris Rees <crees@FreeBSD.org> To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r311453 - head/Tools/scripts Message-ID: <201302030951.r139pTve026387@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: crees Date: Sun Feb 3 09:51:29 2013 New Revision: 311453 URL: http://svnweb.freebsd.org/changeset/ports/311453 Log: Add some checks for Subversion; minimum version required is 1.7, or adding ports with subdirectories fails because of scattered .svn directories. Original issue reported by: netchild Modified: head/Tools/scripts/addport Modified: head/Tools/scripts/addport ============================================================================== --- head/Tools/scripts/addport Sun Feb 3 06:36:22 2013 (r311452) +++ head/Tools/scripts/addport Sun Feb 3 09:51:29 2013 (r311453) @@ -113,6 +113,17 @@ $tmp = $tmp2 = $offset = 0; my $edit = "/usr/bin/vi"; $edit = $ENV{EDITOR} if ($ENV{EDITOR} ne ""); +# Check svn version +my $svnversion = `svn --version --quiet 2>/dev/null`; +chomp $svnversion; +if ($svnversion eq "") { + errx(1, "Subversion binary not found in \$PATH, aborting."); +} +my @svnversion = split(/\./, $svnversion); +if ($svnversion[0] == 1 && $svnversion[1] < 7) { + errx(1, "minimum Subversion version of 1.7 not met, aborting."); +} + # stuff that always happens when we start BEGIN { $tmpdir=`mktemp -d -t ap`;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201302030951.r139pTve026387>