aboutsummaryrefslogtreecommitdiffstats
path: root/make-version.pl
diff options
context:
space:
mode:
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);