While tinkering around tonight I figured I'd share my multline sed for updating 
sha256:

for i in `port -q echo maintainer:snc`; do x=$(sudo port -v checksum $i | grep 
sha256 |grep -v checksum | awk '{print $NF}');  sed -i '' -n 
'1h;1!H;${;g;s/sha256\ \ s/sha256\ \ '$x'/g;p;}' "`port file $i`"; done 
2>/dev/null

It assumes you have this line as a placeholder in the portfile already:
sha256  s

You can follow the general idea to come up with other handy patterns.

Attachment: smime.p7s
Description: S/MIME cryptographic signature

_______________________________________________
macports-dev mailing list
macports-dev@lists.macosforge.org
http://lists.macosforge.org/mailman/listinfo.cgi/macports-dev

Reply via email to