comparison en/examples/hook.ws @ 167:e67251ac336f

Small portability change. "grep -P" doesn't work on Debian.
author Bryan O'Sullivan <bos@serpentine.com>
date Tue, 27 Mar 2007 01:15:34 -0500
parents 06d18465df03
children
comparison
equal deleted inserted replaced
166:08a4467f4891 167:e67251ac336f
1 #!/bin/bash 1 #!/bin/bash
2 2
3 hg init a 3 hg init a
4 cd a 4 cd a
5 echo '[hooks]' > .hg/hgrc 5 echo '[hooks]' > .hg/hgrc
6 echo "pretxncommit.whitespace = hg export tip | (! grep -qP '^\\+.*[ \\t]$')" >> .hg/hgrc 6 echo "pretxncommit.whitespace = hg export tip | (! egrep -q '^\\+.*[ \\t]$')" >> .hg/hgrc
7 7
8 #$ name: simple 8 #$ name: simple
9 9
10 cat .hg/hgrc 10 cat .hg/hgrc
11 echo 'a ' > a 11 echo 'a ' > a