From 73104a1d767f7fe143b69a197e198371ba083dda Mon Sep 17 00:00:00 2001 From: Paul Ramsey Date: Fri, 10 Feb 2012 19:55:36 +0000 Subject: [PATCH] Try to fail better on SVN snatching... git-svn-id: http://svn.osgeo.org/postgis/trunk@9150 b70326c6-7e19-0410-871a-916f4a2858ee --- utils/Makefile | 1 + utils/svn_repo_revision.pl | 16 ++++++++++++++-- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/utils/Makefile b/utils/Makefile index 0c9425602..e5ff05938 100644 --- a/utils/Makefile +++ b/utils/Makefile @@ -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 \ diff --git a/utils/svn_repo_revision.pl b/utils/svn_repo_revision.pl index c4f2aa64a..3c2cfdc0c 100644 --- a/utils/svn_repo_revision.pl +++ b/utils/svn_repo_revision.pl @@ -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 -- 2.40.0