scripts: better sanitise the patch names
author"Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Tue Aug 10 13:25:52 2010 +0200 (2010-08-10)
changeset 2075edc7c7958e80
parent 2072 72b3996ba3e6
child 2076 b58109b7b321
scripts: better sanitise the patch names

When generating the fixes-patches, better sanitise the generated
file names, as it seems to raise a few issues for some people.
scripts/mk-patch.sh
     1.1 --- a/scripts/mk-patch.sh	Fri Aug 06 22:42:55 2010 +0200
     1.2 +++ b/scripts/mk-patch.sh	Tue Aug 10 13:25:52 2010 +0200
     1.3 @@ -34,7 +34,7 @@
     1.4          continue
     1.5      fi
     1.6      plog=$( hg -R "${repos}" log -r ${rev} --template '{desc|firstline}\n'  \
     1.7 -            |sed -r -e 's,[/ :]+,_,g;'                                      \
     1.8 +            |sed -r -e 's,[/:,[:space:]],_,g; s/_+/_/g;'                    \
     1.9            )
    1.10      pname="${p}-${plog}.patch"
    1.11      printf "Revision '%d' --> '%s'\n" ${rev} "${pname}"