Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re: writing a nice installation program/script

by CubicSpline (Friar)
on Jul 30, 2002 at 12:58 UTC ( [id://186188]=note: print w/replies, xml ) Need Help??


in reply to writing a nice installation program/script

Most of my perl is written under Windows using ActiveState and I've written my share of installation scripts with it. The first thing I would suggest is that you download all of the modules that you need and package them up with your installation script (do this on a CD if you have to), but that way you are sure you can install them if necessary.

Here's some psuedocode that I would use when trying to address the problem that you're describing:

1. get the list of packages currently installed:
   @packages = split /\n/,`ppm query -a`;
2. loop through your list of required packages and grep for the package name in the list @packages:
   foreach $package (@required){ if( ! grep $package, @packages )
3. if the package you need is not in the list, then install it:
   system("ppm install $package");
4. once through the list of required packages, go on about the rest of your installation steps.

Not sure if this is any help, but maybe something to think about. Good luck!

~CubicSpline
"No one tosses a Dwarf!"

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://186188]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others avoiding work at the Monastery: (6)
As of 2024-04-18 01:18 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found