Tags:
create new tag
, view all tags
perhaps this (or if modifications are required, some variation) can be incorporated into the CairoRelease twiki will then work on macs "out-of-the-box" to the same degree as other unix platforms.

Index: TWiki.cfg
===================================================================
--- TWiki.cfg   (revision 1735)
+++ TWiki.cfg   (working copy)
@@ -205,14 +205,28 @@
 $storeTopicImpl = "RcsWrap"; 
 #$storeTopicImpl = "RcsLite";
 
+sub findProgramUsingSearchPath
+{
+       my ($prog,$paths) = @_;
+
+       foreach my $path ( @{$paths} )
+       {
+               my $fullPath = "$path/$prog";
+               return $fullPath if -X $fullPath;
+       }
+
+       return "";
+}
+my $programSearchPath = [ qw( /bin /usr/bin /usr/local/bin ) ];
+
 #                   NOTE: You might want to avoid c: at start of cygwin unix command for
 #                   Windows, seems to cause a problem with pipe used in search
 #                   Unix ls command :  (deprecated since 01 Nov 2003)
 $lsCmd            = "/bin/ls";
 #                   Unix egrep command :
-$egrepCmd         = "/bin/egrep";
+$egrepCmd         = findProgramUsingSearchPath( egrep => $programSearchPath );
 #                   Unix fgrep command :
-$fgrepCmd         = "/bin/fgrep";
+$fgrepCmd         = findProgramUsingSearchPath( fgrep => $programSearchPath );
 
 #display Time in the following timezones (this only effects the display of times, all internal storage is still in GMT)
 # gmtime / servertime

-- WillNorris - 27 Aug 2004

I'd rather not take this last minute change into Cairo for two reasons:

  1. Extra runtime processing that can be avoided (-X is expensive)
  2. MartinGregory's UpgradeTWiki script probably needs to be changed

-- PeterThoeny - 28 Aug 2004

ok, thanks for the quick reply.

-- WillNorris - 28 Aug 2004

 
Topic attachments
I Attachment Action Size Date Who Comment
elsediff find-greps-on-path.diff manage 1.2 K 27 Aug 2004 - 06:44 WillNorris searches a path for grep programs so that twiki can work out-of-the-box on macs
Topic revision: r6 - 27 Jun 2005 - 23:13:10 - WillNorris
 
This site is powered by the TWiki collaboration platformCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback