Magellan Linux

Contents of /branches/mage-next/src/up2date/perl.sh.in

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2591 - (show annotations) (download)
Tue Mar 4 08:35:27 2014 UTC (10 years, 1 month ago) by niro
File size: 350 byte(s)
-split function into single includes
1 updatecmd_perl()
2 {
3 local pname=$1
4 local archive
5 local uppver
6
7 [[ -z ${pname} ]] && die "give me a \$PNAME"
8 [[ ! -z $2 ]] && archive="$2"
9
10 uppver=$(updatecmd "http://search.cpan.org/dist/${pname}/" | lasttarball "${archive}")
11
12 if [[ ! -z ${UP2SUBSTITUTE} ]]
13 then
14 echo "${uppver}" | sed "s:${UP2SUBSTITUTE}::g"
15 else
16 echo "${uppver}"
17 fi
18 }