aboutsummaryrefslogtreecommitdiffstats
path: root/release.sh
diff options
context:
space:
mode:
authorGravatar Steven Schubiger <stsc@refcnt.org> 2016-11-27 21:55:47 +0100
committerGravatar Steven Schubiger <stsc@refcnt.org> 2016-11-27 21:55:47 +0100
commitbc475ef9585d31377b2f02dde4a4941ecec58d06 (patch)
tree4fab9320a924e9c454a14e00467e4fef56a6b198 /release.sh
parentafbfe4ff6003d2e148130d570fd46bf5dd3103bd (diff)
downloadcolorize-bc475ef9585d31377b2f02dde4a4941ecec58d06.tar.gz
colorize-bc475ef9585d31377b2f02dde4a4941ecec58d06.tar.bz2
Round version to 2 digits after decimal point
Diffstat (limited to 'release.sh')
-rwxr-xr-xrelease.sh4
1 files changed, 2 insertions, 2 deletions
diff --git a/release.sh b/release.sh
index f6da284..b2bbe19 100755
--- a/release.sh
+++ b/release.sh
@@ -2,7 +2,7 @@
source_file="colorize.c"
man_file="colorize.1"
printf '%s\n' "Setting version for $source_file"
-perl -i -pe 's/(?<=#define VERSION ")([^"]+)(?=")/$1+0.01/e' $source_file
+perl -i -pe 's/(?<=#define VERSION ")([^"]+)(?=")/sprintf("%.2f",$1+0.01)/e' $source_file
printf '%s\n' "Setting version for $man_file"
-perl -i -pe 's/(?<=\.TH COLORIZE 1 "\d{4}-\d{2}-\d{2}" "colorize v)([^"]+)(?=")/$1+0.01/e' $man_file
+perl -i -pe 's/(?<=\.TH COLORIZE 1 "\d{4}-\d{2}-\d{2}" "colorize v)([^"]+)(?=")/sprintf("%.2f",$1+0.01)/e' $man_file
exit 0