[23900] users/pipping

source_changes at macosforge.org source_changes at macosforge.org
Thu Apr 12 09:48:39 PDT 2007


Revision: 23900
          http://trac.macosforge.org/projects/macports/changeset/23900
Author:   pipping at macports.org
Date:     2007-04-12 09:48:39 -0700 (Thu, 12 Apr 2007)

Log Message:
-----------
 * remove the original shell script (no longer useful)
 * rename test.pl to something meaningful (find_dependents.pl)
 * move /o to appropriate regexes

Added Paths:
-----------
    users/pipping/find_dependents.pl

Removed Paths:
-------------
    users/pipping/test.pl
    users/pipping/test.sh

Copied: users/pipping/find_dependents.pl (from rev 23899, users/pipping/test.pl)
===================================================================
--- users/pipping/find_dependents.pl	                        (rev 0)
+++ users/pipping/find_dependents.pl	2007-04-12 16:48:39 UTC (rev 23900)
@@ -0,0 +1,40 @@
+#! /usr/bin/env perl
+
+use strict;
+use warnings;
+
+my $port = $ARGV[0];
+
+# prepare freqently used regexes
+my $trailing_comment      = qr{;(?>\s*)#(?>.*)};
+my $leading_comment       = qr{(?:^|\n)(?>\s*)#(?>.*)};
+my $connecting_backslash  = qr{\s*\\\n\s*};
+
+my $quick_check = qr{:$port}i;
+my $dependency  = qr{
+                    (?=[plb])(?:port|(?:path|lib|bin):[^:]+)  # kind
+                    :                                         # separator
+                    (?i:${port})\b                            # name
+                  }x;
+
+$/ = ".\n";
+
+while (defined(my $portfile = <*/*/Portfile>)) { 
+  @ARGV = $portfile;
+
+  while (<>) {
+    # make a quick and dirty check if the port has a remote chance of
+    # depending on $port
+    if ( m{$quick_check}o ) {
+
+      s{$connecting_backslash}{ }o;   # merge backslash-connected lines
+      s{$leading_comment}{}o;         # remove leading comments
+      s{$trailing_comment}{}o;        # remove trailing comments
+
+      if ( m{$dependency}o ) {
+        $portfile =~ s{/Portfile$}{}; # remove trailing '/Portfile'
+        print "$portfile\n";
+      }
+    }
+  }
+}

Deleted: users/pipping/test.pl
===================================================================
--- users/pipping/test.pl	2007-04-12 16:25:21 UTC (rev 23899)
+++ users/pipping/test.pl	2007-04-12 16:48:39 UTC (rev 23900)
@@ -1,40 +0,0 @@
-#! /usr/bin/env perl
-
-use strict;
-use warnings;
-
-my $port = $ARGV[0];
-
-# prepare freqently used regexes
-my $trailing_comment      = qr{;(?>\s*)#(?>.*)};
-my $leading_comment       = qr{(?:^|\n)(?>\s*)#(?>.*)};
-my $connecting_backslash  = qr{\s*\\\n\s*};
-
-my $quick_check = qr{:$port}io;
-my $dependency  = qr{
-                    (?=[plb])(?:port|(?:path|lib|bin):[^:]+)  # kind
-                    :                                         # separator
-                    (?i:${port})\b                            # name
-                  }xo;
-
-$/ = ".\n";
-
-while (defined(my $portfile = <*/*/Portfile>)) { 
-  @ARGV = $portfile;
-
-  while (<>) {
-    # make a quick and dirty check if the port has a remote chance of
-    # depending on $port
-    if ($_ =~ m{$quick_check}) {
-
-      s{$connecting_backslash}{ };    # merge backslash-connected lines
-      s{$leading_comment}{};          # remove leading comments
-      s{$trailing_comment}{};         # remove trailing comments
-
-      if ($_ =~ m{$dependency}) {
-        $portfile =~ s{/Portfile$}{}; # remove trailing '/Portfile'
-        print "$portfile\n";
-      }
-    }
-  }
-}

Deleted: users/pipping/test.sh
===================================================================
--- users/pipping/test.sh	2007-04-12 16:25:21 UTC (rev 23899)
+++ users/pipping/test.sh	2007-04-12 16:48:39 UTC (rev 23900)
@@ -1,12 +0,0 @@
-#! /bin/sh
-
-# room for customization
-SED=/usr/bin/sed
-EGREP=/usr/bin/egrep
-
-for i in */*/Portfile;
-    do if [ `$EGREP -ci "^[^#]*(port|(path|lib|bin):[^:]+):$1\>" "$i"` \
-    -gt 0 ]
-        then echo $i | $SED "s=/Portfile=="
-    fi
-done;

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


More information about the macports-changes mailing list