Link to home
Start Free TrialLog in
Avatar of richsark
richsarkFlag for United States of America

asked on

ppm conversion to curl on a module install

Hello,

I have a shell script named update.sh that has this:

@echo off
set ip=%1
ppm install --force https://%ip%/api/dist/ppm/richard.ppd

I used to run it like this when I used activestate perl

./update.sh 100.100.100.100

it would connect to this IP inside my network and install it.

Now I switched to cpan using perl that came with my macbook and of course the script won't run.

how can I use the same script using cpan or curl to install it?

Thanks in advance
Avatar of FishMonger
FishMonger
Flag of United States of America image

That's a Windows batch script, not a shell script.

Why would you want to use cpan or curl to install a ppd file?

You need to use ppm to install a module from a ppd file.
Avatar of richsark

ASKER

Ok. So what would be the command for that sir?
I'm not a shell programmer, but assuming ppm is in your path, it could be as simple as:

#!/bin/bash

ppm install --force https://$0/api/dist/ppm/richard.ppd

Open in new window

Hi,

I dont see ppm in my path since I am not using activate-state Perl

I even tried :
sudo curl -o  'https://192.168.0.220/api/dist/ppm/=Richard.ppd' -k

And got:
local/blue-ripts
==> curl https://192.168.0.220/api/dist/ppm/blox.ppd -k
'<?xml version="1.0" encoding="UTF-8"?>
<SOFTPKG NAME="blox" VERSION="6,01260130299142,0,0">
  <TITLE>Infoblox</TITLE>
  <ABSTRACT>lox Data and Management API 6.12.13</ABSTRACT>
  <AUTHOR>ARRAY(0x2419e58)</AUTHOR>
  <IMPLEMENTATION>
    <CODEBASE HREF="Richard-6.01260130299142.tar.gz" />
  </IMPLEMENTATION>
</SOFTPKG>
ASKER CERTIFIED SOLUTION
Avatar of FishMonger
FishMonger
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Hi fishmonger.  By doing your command. Will I still be able to install cpan stuff as usual or will it switch all to ppm ?

Or will I have have a choice to do both?
You can still use cpan.

In fact you could use anyone of a number of ways to install modules; cpan, ppm, rpm, manual build (make; make test; make install), plus several other options.
Awesome as always