Make sure that the back-referencing "patches" symlink is always right.
authorWayne Davison <wayned@samba.org>
Fri, 26 Oct 2007 23:55:32 +0000 (23:55 +0000)
committerWayne Davison <wayned@samba.org>
Fri, 26 Oct 2007 23:55:32 +0000 (23:55 +0000)
verify-patches

index 64ae506..67698cd 100755 (executable)
@@ -2,6 +2,7 @@
 
 use strict;
 use Getopt::Long;
+use Cwd;
 
 my @generated_files = qw( proto.h configure config.h.in rsync.1 rsyncd.conf.5 );
 
@@ -31,6 +32,8 @@ from inside the patches subdir.
 EOT
 }
 
+my $patches_dir = Cwd::cwd();
+
 $ENV{'LC_COLLATE'} = 'C';
 $| = 1;
 my $CONF_OPTS = '--cache-file=../config.cache';
@@ -51,7 +54,8 @@ close IN;
 
 mkdir('tmp', 0777) unless -d 'tmp';
 chdir('tmp') or die "Unable to chdir to 'tmp'";
-symlink('..', 'patches') unless -d 'patches';
+unlink('patches');
+symlink($patches_dir, 'patches');
 
 symlink($$, 'lock') or die "Unable to create lock file: $!\n";