Pastie now auto-senses if line-wrap is a bad or good idea. Feedback?
## mark a section (Learn more)
err: Could not parse for environment production: append_if_no_such_line is already defined at /home/me/working/puppet/modules/common/manifests/init.pp:13; cannot redefine at /home/me/working/puppet/./modules/common/manifests/init.pp:13 import '*' define append_if_no_such_line($file, $line, $refreshonly = 'false') { exec { "/bin/echo '$line' >> '$file'": unless => "grep -Fxqe '$line' '$file'", path => "/bin:/usr/bin", refreshonly => $refreshonly, } } define delete_lines($file, $pattern) { exec { "/bin/sed -i -r -e '/$pattern/d' $file": path => "/bin:/usr/bin", onlyif => "grep -E '$pattern' '$file'", } }
This paste will be private.
From the Design Piracy series on my blog: