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
#!/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- )
_______________________________________________
macports-dev mailing list
macports-dev@lists.macosforge.org
http://lists.macosforge.org/mailman/listinfo.cgi/macports-dev

Reply via email to