Keep spaces as they are

This is mainly useful for the setup.py, which does not have spaces for
the version=.
This commit is contained in:
Laurent Bachelier 2013-03-06 23:39:34 +01:00
commit 15829e9fe6

View file

@ -4,7 +4,7 @@
function set_version {
echo -n "Replacing version in source files to $1"
for fl in $(find . -iname "*.py"); do
sed "s/\(VERSION\|version\|release\) *= *[\"'][0-9]\+\..\+[\"']\(,\?\)$/\1 = '$1'\2/g" $fl > $fl.new
sed "s/\(VERSION\|version\|release\)\( *\)=\( *\)[\"'][0-9]\+\..\+[\"']\(,\?\)$/\1\2=\3'$1'\4/g" $fl > $fl.new
diff $fl.new $fl >/dev/null && echo -n "." || echo -n "+"
cp -f $fl.new $fl
rm -f $fl.new