svn commit: r293777 - user/cperciva/freebsd-update-build/scripts

Gleb Smirnoff glebius at FreeBSD.org
Tue Jan 12 22:36:42 UTC 2016


On Tue, Jan 12, 2016 at 10:19:30AM -0800, Devin Teske wrote:
D> On Tue, 2016-01-12 at 10:08 -0800, Gleb Smirnoff wrote:
D> > On Tue, Jan 12, 2016 at 06:06:07PM +0000, Gleb Smirnoff wrote:
D> > T> Author: glebius
D> > T> Date: Tue Jan 12 18:06:07 2016
D> > T> New Revision: 293777
D> > T> URL: https://svnweb.freebsd.org/changeset/base/293777
D> > T> 
D> > T> Log:
D> > T>   Adjust script removing .orig files and empty files:
D> > T>   - Adopt the regexp to cleaned patches, that don't have
D> > T>     diff or subversion header.
D> > T>   - Switch from awk to sed, due to bugs in awk regexps.
D> > 
D> > If anyone interested, in our awk regexp "^diff" would match
D> > "    diff", any amount of whitespace. Since ntp has a lot
D> > variables named diff, running the script over ntp patches
D> > produce a lot of garbage.
D> > 
D> 
D> Gleb, I can't seem to reproduce what you're saying.
D> 
D> $ echo "   diff" | awk '/^diff/'
D> $ echo "   diff" | awk '!/^diff/'
D>    diff

echo "  diff" | awk '$1 ~ /^diff/ { print $NF }'

-- 
Totus tuus, Glebius.


More information about the svn-src-user mailing list