You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@spamassassin.apache.org by qu...@apache.org on 2005/02/11 01:23:21 UTC
svn commit: r153305 - spamassassin/trunk/build/do
Author: quinlan
Date: Thu Feb 10 16:23:19 2005
New Revision: 153305
URL: http://svn.apache.org/viewcvs?view=rev&rev=153305
Log:
ah, I get it
Modified:
spamassassin/trunk/build/do
Modified: spamassassin/trunk/build/do
URL: http://svn.apache.org/viewcvs/spamassassin/trunk/build/do?view=diff&r1=153304&r2=153305
==============================================================================
--- spamassassin/trunk/build/do (original)
+++ spamassassin/trunk/build/do Thu Feb 10 16:23:19 2005
@@ -33,15 +33,12 @@
my ($cmd, $src, $tgt, $lnk) = @ARGV;
-# Check if the source is a symlink and read the target. On systems which do
-# not support symlinks, readlink will bail out which is catched by the eval,
-# similar to what 'perldoc -f symlink' suggests. It will fall back to copy
-# then.
-if ($cmd eq 'symlink' && !SYMLINK) {
- $cmd = 'copy';
-}
+# If symlinks work and source is a symlink and we're copying, do a symlink.
+$cmd = 'symlink' if (SYMLINK && -l $src);
+# If symlinks do not work and we're symlinking, do a copy.
+$cmd = 'copy' if (!SYMLINK && $cmd eq 'symlink');
-# If we're supposed to link, do so.
+# Figure out the symlink source.
if ($cmd eq 'symlink') {
$lnk = (-l $src) ? readlink($src) : $src;
}