[24743] users/pipping/Portfile

source_changes at macosforge.org source_changes at macosforge.org
Wed May 2 08:45:21 PDT 2007


Revision: 24743
          http://trac.macosforge.org/projects/macports/changeset/24743
Author:   pipping at macports.org
Date:     2007-05-02 08:45:21 -0700 (Wed, 02 May 2007)

Log Message:
-----------
 * add check: does the target to be linked to exist

Modified Paths:
--------------
    users/pipping/Portfile

Modified: users/pipping/Portfile
===================================================================
--- users/pipping/Portfile	2007-05-02 15:29:12 UTC (rev 24742)
+++ users/pipping/Portfile	2007-05-02 15:45:21 UTC (rev 24743)
@@ -25,13 +25,21 @@
               ui_msg "-> won't touch anything but a link!"
             } else {
               delete ${file}
+              if {[file exists $target]} {
+                ln -s ${target} ${file}
+              } else {
+                ui_msg "-> target does not exist:\n   ${target}"
+              }
+            }
+          } else {
+            if {[file exists $target]} {
               ln -s ${target} ${file}
+            } else {
+              ui_msg "-> target does not exist:\n   ${target}"
             }
-          } else {
-            ln -s ${target} ${file}
           }
-          ui_msg "-->file:   ${file}"
-          ui_msg "-->target: ${target}"
+          ui_msg "-> <debug> file:\n   ${file}"
+          ui_msg "-> <debug> target:\n   ${target}"
         }
       }
       default {

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.macosforge.org/pipermail/macports-changes/attachments/20070502/f6be603c/attachment.html


More information about the macports-changes mailing list