opensubscriber
   Find in this group all groups
 
Unknown more information…

a : automator-dev@lists.apple.com 2 December 2005 • 2:54AM -0500

Re: automated builds of Automator actions
by Christopher Nebel

REPLY TO AUTHOR
 
REPLY TO GROUP




On Nov 28, 2005, at 7:52 AM, Jim Matthews wrote:

> 2) amlint tries to make sure that custom data types are defined by  
> a .definition bundle in /System/Library/Automator, ~/Library/
> Automator, etc.  But the build machine won't have the freshly-
> built .definition bundle installed (in general we try to install as  
> little software on the build machine as possible).  Is there a way  
> to tell amlint to look in a build products folder (short of  
> customizing the amlint script itself)?

Not currently, but adding a command-line option to do that isn't  
hard, and is probably a good idea to boot.  Here's my quick-and-dirty  
change to do it (you can read "diff -u" output, right?):

@@ -1,7 +1,7 @@
#!/usr/bin/perl -w
use strict;
-use Getopt::Std;
+use Getopt::Long;
use Foundation;
use File::Glob ':glob';
use File::Basename;
@@ -25,6 +25,7 @@
our $opt_s;
our $opt_S;
our $opt_x;
+our @opt_d;

sub plist($)
@@ -142,7 +143,8 @@
                 foreach ( glob("/System/Library/Automator/
*.definition"),
                           glob("/Network/Library/Automator/
*.definition"),
                           glob("/Library/Automator/*.definition"),
-                         glob("$ENV{'HOME'}/Library/Automator/
*.definition") )
+                         glob("$ENV{'HOME'}/Library/Automator/
*.definition"),
+                         @opt_d )
                         # XXX: doesn't handle app-
embedded .definitions...
                 {
                         my $d = plist(-f $_ ? $_ : "$_/Contents/
Resources/definition.plist");
@@ -312,13 +314,19 @@
#### main.
PerlObjCBridge::setDieOnExceptions(0);
+Getopt::Long::Configure("bundling");
if ($#ARGV == -1) {
-       print STDERR "usage: $0 [-hHsS] [-x exception-file] action...
\n";
+       print STDERR "usage: $0 [-hHsS] [-x exception-file] [-d  
definition-file ...] action...\n";
         exit 1;
}
-getopts('hHsSx:');
+GetOptions(    "h" => \$opt_h,
+                       "H" => \$opt_H,
+                       "s" => \$opt_s,
+                       "S" => \$opt_S,
+                       "x=s" => \$opt_x,
+                       "d=s" => \@opt_d);
$line_header = $#ARGV > 0;
$line_header = 1 if $opt_H;
$line_header = 0 if $opt_h;


If you need more than one definition file, you can repeat the "-d"  
option as many times as necessary ("-d foo  -d bar").  Notice that  
the argument to "-d" is the definition file itself, not a folder to  
search.


--Chris Nebel
AppleScript and Automator Engineering

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Automator-dev mailing list      (Automator-dev@list...)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/automator-dev/subscriber%40opensubscriber.com

This email sent to subscriber@open...

Bookmark with:

Delicious   Digg   reddit   Facebook   StumbleUpon

Related Messages

opensubscriber is not affiliated with the authors of this message nor responsible for its content.