[MacPorts] #34784: Add perl5.branches to all p5 ports (adding p5.16 for perl5.16)

Bjarne D Mathiesen macintosh at mathiesen.info
Thu Jun 7 21:55:58 PDT 2012


Bjarne D Mathiesen wrote:
> The attached script ought to fix this

Upppsss ... too fast
Corrected script ... hopefully without errors this time ;-)

-- 
Bjarne D Mathiesen
København N ; Danmark ; Europa
----------------------------------------------------------------------
denne besked er skrevet i et totalt M$-frit miljø
MacOS X 10.7.3 Lion ; 2.8GHz Intel Core i7 ; 16GB 1067MHz DDR3
-------------- next part --------------
#!/macports/bin/bash
while read -a portname
do
    echo -e "${portname[2]}"
    
    cd  $(dirname $(port file ${portname[0]}))

    mv  'Portfile' 'Portfile.orig'
    declare portrev=( $( grep 'perl5.branches' $(port file ${portname[0]}) ) )
    if [[ ${#portrev[@]} -eq 0 ]]
        sed -En -e "1,^PortGroup/p" 'Portfile.orig' \
            >  'Portfile'
        echo -e "perl5.branches         5.8 5.10 5.12 5.14 5.16" \
            >> 'Portfile'
        sed -E  -e "1,PortGroup/d" 'Portfile.orig' \
            >> 'Portfile'
    else
        sed -E -e  "/^perl5.branches/s/^(.*)$/\1 5.16/"   \
            'Portfile.orig' \
        >   'Portfile'
    fi
    rm  'Portfile.orig'

done < <( port list name:^p5- )


More information about the macports-dev mailing list