File: release.sh

package info (click to toggle)
colorize 0.67-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 804 kB
  • sloc: ansic: 1,828; perl: 764; makefile: 31; sh: 7
file content (8 lines) | stat: -rwxr-xr-x 366 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
#!/bin/sh
source_file="colorize.c"
man_file="colorize.1"
printf '%s\n' "Setting version for $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)([^"]+)(?=")/sprintf("%.2f",$1+0.01)/e' $man_file
exit 0