aboutsummaryrefslogtreecommitdiffstats
path: root/make-version.pl
diff options
context:
space:
mode:
authorGerald Combs <gerald@wireshark.org>2004-12-29 15:54:55 +0000
committerGerald Combs <gerald@wireshark.org>2004-12-29 15:54:55 +0000
commita1f2fba1ad4bc4803c2c95751f97080ba9a5a529 (patch)
treeb4fbc2d7d9ac4dbf5759bb7515464557298b9749 /make-version.pl
parentd9be4670a7b136db6e7c7ecfbc9dcc75dd010b63 (diff)
If we can't find the "svn" executable in the current path, look in
"c:/cygwin/lib/subversion/bin/", which is the current default location for Subversion 1.1.1 under Cygwin. If we still can't find "svn", simply return instead of exiting. svn path=/trunk/; revision=12856
Diffstat (limited to 'make-version.pl')
-rwxr-xr-xmake-version.pl18
1 files changed, 16 insertions, 2 deletions
diff --git a/make-version.pl b/make-version.pl
index 411dc0dcf7..9869709ee4 100755
--- a/make-version.pl
+++ b/make-version.pl
@@ -75,8 +75,22 @@ sub read_svn_info {
my $line;
my $version_format = $version_pref{"format"};
my $package_format = $version_pref{"pkg_format"};
-
- open(SVNINFO, "svn info |") || die("Unable to get SVN info!");
+ # If any other odd paths pop up, put them here.
+ my @svn_paths = ("", "c:/cygwin/lib/subversion/bin/");
+ my $svn_cmd;
+ my $svn_pid;
+
+ foreach $svn_cmd (@svn_paths) {
+ $svn_cmd .= "svn info";
+ if ($svn_pid = open(SVNINFO, $svn_cmd . " |")) {
+ print ("Fetching version with command \"$svn_cmd\".\n");
+ last;
+ }
+ }
+ if (! defined($svn_pid)) {
+ print ("Unable to get SVN info.\n");
+ return;
+ }
while ($line = <SVNINFO>) {
if ($line =~ /^Last Changed Date: (\d{4})-(\d\d)-(\d\d) (\d\d):(\d\d):(\d\d)/) {
$last = timegm($6, $5, $4, $3, $2 - 1, $1);