sipb / config-package-dev

Debhelper (and CDBS) modules for building configuration packages
https://debathena.mit.edu/config-package-dev
15 stars 4 forks source link

Document the perl -0p trick #4

Open geofft opened 5 years ago

geofft commented 5 years ago

Several Debathena packages use a transform script that's something like perl -0pe 's/^foo$/bar/m or die' to get the effect of sed s/^foo$/bar/ but cause a build-time error if the regex doesn't match anything. We should document this and why it works.

See for instance https://github.com/mit-athena/ssh-client-config/blob/master/debian/transform_ssh_config.debathena

vulpicastor commented 5 years ago

Do you have a recommendation for the best place for this information? The DOCUMENTATION file points me to either https://debathena.mit.edu/config-package-dev/ or the packaged examples. I suspect the latter because it seems too miscellaneous to be included in the main doc.