On Mon, 5 Feb 2007 14:28:06 -0600, <Aaron.C.Remick wellsfargo.com>
wrote:
>My goal is to have a batch script that I can run on any
system and
>install all the packages I need for my scripts. I'm not
experienced in
>batch scripting (why I want perl) or Windows in general,
so the error
>might well be on that side.
>
>This is what my script, ppmScript.cmd, looks like:
>
> echo got here
> ppm install Archive::Zip
ppm is a batch file as well, so you need to call it as
call ppm install Archive-Zip
(the correct distribution name is Archive-Zip, Archive::Zip
is just a
module provided by that distribution. PPM most often does
the right
thing when you specify a module name, but sometimes it can
make a
difference).
[...]
>It never executes the "got here" echo or any
other subsequent line. It
>simply exits after the first ppm command. I want this
script to be able
>to install a number of packages and sync my repo areas.
How can I write
>a batch that can execute more than one PPM command?
You may also want to investigate the PPM-Profile
distribution. You can
record the list of packages installed by PPM on one machine,
and then
make PPM install the same set on other machines. It even
tries to get
the same packages from the same repositories again.
ppm install PPM-Profile
ppmprofile save c:profile.ppm
copy the profile.ppm to another machine and do:
ppm install PPM-Profile
ppmprofile restore c:profile.ppm
You can migrate from PPM3 to PPM4 using this technique too.
There is one issue with ActivePerl 819 though: it doesn't
put the
C:Perlsitebin directory on the PATH, so you may need to
either do
this yourself, or invoke ppmprofile with a full path:
c:perlsitebinppmprofile save c:profile.ppm
Cheers,
-Jan
_______________________________________________
PPM mailing list
PPM listserv.ActiveState.com
http://listserv.ActiveState.com/mailman/listinfo/ppm
|