]> granicus.if.org Git - postgis/commitdiff
Try to fail better on SVN snatching...
authorPaul Ramsey <pramsey@cleverelephant.ca>
Fri, 10 Feb 2012 19:55:36 +0000 (19:55 +0000)
committerPaul Ramsey <pramsey@cleverelephant.ca>
Fri, 10 Feb 2012 19:55:36 +0000 (19:55 +0000)
git-svn-id: http://svn.osgeo.org/postgis/trunk@9150 b70326c6-7e19-0410-871a-916f4a2858ee

utils/Makefile
utils/svn_repo_revision.pl

index 0c9425602276fd9d4a4ae777d6f8515a267e4f66..e5ff05938fab69382851451b7621b4ed97617364 100644 (file)
@@ -1,6 +1,7 @@
 SCRIPTS = \
        postgis_restore.pl \
        create_undef.pl \
+       svn_repo_revision.pl \
        postgis_proc_upgrade.pl \
        profile_intersects.pl \
        test_estimation.pl \
index c4f2aa64a1aa695396e58150862c2d20cb2594c7..3c2cfdc0c12f115dd6579f8994e0c8780594e3ea 100644 (file)
@@ -12,11 +12,23 @@ my $target = "local";
 $target = $ARGV[0] if $ARGV[0];
 
 # Don't muck with things if you can't find svn
-exit(0) if ( ! $svn_exe );
+if ( ! $svn_exe ) {
+  if ( ! -f "svnrevision.h" ) {
+    die "Couldn't find svn exectable or svnrevision.h, cannot continue.\n";
+  }
+  else {
+    exit(0);
+  }
+};
 
 # Don't muck with thinks if you aren't in an svn repository
 if ( $target eq "local" && ! -d ".svn" ) {
-  exit(0);
+  if ( ! -f "svnrevision.h" ) {
+    die "Couldn't find or generate svnrevision.h, cannot continue.\n";
+  }
+  else {
+    exit(0);
+  }
 }
 
 # Read the svn revision number