List Info

Thread: Ppm commands from a batch script




Ppm commands from a batch script
user name
2007-02-05 14:28:06

Hello all,

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
        echo got there
        ppm install Archive::Extract

The output looks like this:

     ;   C:batchtemplates>ppmScript.cmd

    ;    C:batchtemplates>echo got here
  ;      got here

       ; C:batchtemplates>ppm install Archive::Zip
        Downloading The University of Winnipeg's 5.8 PPM repository packlist...not modif
        ied
    ;    No missing packages to install

 ;       C:batchtemplates>

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?

Thanks,

--
aaron remick
wells fargo - health benefit services
aaron.c.remickwellsfargo.com
415.498.2091

Re: Ppm commands from a batch script
user name
2007-02-05 14:38:16
On Mon, 5 Feb 2007 14:28:06 -0600, <Aaron.C.Remickwellsfargo.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
PPMlistserv.ActiveState.com

http://listserv.ActiveState.com/mailman/listinfo/ppm

[1-2]

about | contact  Other archives ( Real Estate discussion Medical topics )