File: chversion.sh

package info (click to toggle)
poedit 1.3.5-2
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 8,948 kB
  • ctags: 1,184
  • sloc: cpp: 9,388; sh: 3,630; makefile: 261; ansic: 178
file content (24 lines) | stat: -rwxr-xr-x 531 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#!/bin/sh

replace_ver()
{
    echo "replacing in $1..."
    echo "
,s@$2@$3@g
w
q
" | ed -s $1 2>/dev/null
}

VER=$1

replace_ver install/poedit.spec \
            '\(Version: *\).*' "\1$VER"
replace_ver install/poedit.iss \
            '\(#define VERSION *"\).*\("\)' "\1$VER\2"
replace_ver configure.in \
            '\(AC_INIT(\[poedit\], \[\)[^]]*\(\],.*\)' "\1$VER\2"
replace_ver make-distrib.sh \
            '\(VERSION=\).*' "\1$VER"
replace_ver src/edapp.cpp \
            '\(wxString version(_T("\).*\("));\)' "\1$VER\2"