Created
October 27, 2010 16:20
-
-
Save squeeks/649367 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env perl | |
use strict; | |
use warnings; | |
use Getopt::Long; | |
use Pod::Usage; | |
use constant ADOBE_EXTMNGR => '/Applications/Adobe Extension Manager CS5/'; | |
use constant ADOBE_APPFOLDER => 'Adobe Extension Manager CS5.app/Contents/MacOS/Adobe Extension Manager CS5'; | |
my $mxi_file; my $mxp_file; my $args; my $help; | |
GetOptions( | |
'mxi=s' => \$mxi_file, | |
'mxp=s' => \$mxp_file, | |
'args=s' => \$args, | |
'help|?' => \$help | |
); | |
pod2usage(1) if($help || !$mxi_file && !$mxp_file); | |
my $cmd = ADOBE_EXTMNGR.ADOBE_APPFOLDER.' -package mxi="'.$mxi_file.'" mxp="'.$mxp_file.'" '; | |
if($args) | |
{ | |
$cmd .= $args; | |
} | |
system $cmd; | |
exit; | |
__END__ | |
=head1 NAME | |
MXP package - Package Adobe Extension MXI files into MXP | |
=head1 SYNOPSIS | |
This script will, given arguments talk to the Adobe Extension Manager and bundle | |
your extension together. | |
=head1 USAGE | |
./mxp_package.pl --mxi=Extension.mxi --mxp=Extension.mxp | |
If you want to add in additional arguments, like package through BridgeTalk or | |
pipe the data out somewhere, simply use --args and encapulate them under | |
quote marks. | |
=head1 CONFIGURATION | |
By default this will talk to a default install of CS5. If you have your | |
Extension Manager in a different location, edit this file and modify the | |
constants defined above this to whatever is appropriate. | |
=head1 AUTHOR | |
Squeeks, L<squeek@cpan.org> | |
=head1 LICENSE | |
This is licensed under the same terms as Perl itself. | |
=cut |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment