aboutsummaryrefslogtreecommitdiffstats
path: root/Tools
diff options
context:
space:
mode:
authorcrees <crees@FreeBSD.org>2013-02-03 17:51:29 +0800
committercrees <crees@FreeBSD.org>2013-02-03 17:51:29 +0800
commit5d1c478e2246e76cfc802cd2816550c57da1fe1b (patch)
tree4342d2d766485fa6d24d925f86ae9f4276cb65fa /Tools
parent81c1457aea74427a760ed5df483225dd07055060 (diff)
downloadfreebsd-ports-gnome-5d1c478e2246e76cfc802cd2816550c57da1fe1b.tar.gz
freebsd-ports-gnome-5d1c478e2246e76cfc802cd2816550c57da1fe1b.tar.zst
freebsd-ports-gnome-5d1c478e2246e76cfc802cd2816550c57da1fe1b.zip
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
Diffstat (limited to 'Tools')
-rwxr-xr-xTools/scripts/addport11
1 files changed, 11 insertions, 0 deletions
diff --git a/Tools/scripts/addport b/Tools/scripts/addport
index 4048a975984f..8bfc7ac65d36 100755
--- a/Tools/scripts/addport
+++ b/Tools/scripts/addport
@@ -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`;