92fcf7b35b992c8b7172fbe9bbd2861ea85b7745
[wimlib] / tools / update-version
1 #!/bin/bash
2
3 oldver='1\.11\.0'
4 oldmonth=January
5 oldyear=2017
6
7 newmajor=1
8 newminor=12
9 newpatch=0
10 newmonth=July
11 newyear=2017
12
13
14 newver="${newmajor}.${newminor}.${newpatch}"
15 pat='This is wimlib version [^[:space:]]\+ ([^[:space:]]\+ [^[:space:]]\+)'
16 sed -i "s/$pat/This is wimlib version $newver ($newmonth $newyear)/" README
17
18 sed -i "s/$oldver/$newver/" configure.ac
19
20 sed -i -e 's/\(#define WIMLIB_MAJOR_VERSION[[:space:]]\+\)[[:digit:]]\+/\1'$newmajor'/' \
21        -e 's/\(#define WIMLIB_MINOR_VERSION[[:space:]]\+\)[[:digit:]]\+/\1'$newminor'/' \
22        -e 's/\(#define WIMLIB_PATCH_VERSION[[:space:]]\+\)[[:digit:]]\+/\1'$newpatch'/' \
23        -e 's/\(the library interface of wimlib \)'$oldver'/\1'$newver'/' \
24           include/wimlib.h
25
26 sed -i -e "1s/$oldmonth $oldyear/$newmonth $newyear/;1s/wimlib $oldver/wimlib $newver/" \
27           doc/man[1-9]/*.[1-9]
28
29 sed -i "s/pkgver=$oldver/pkgver=$newver/" archlinux/PKGBUILD
30
31 sed -i "1i\\
32 wimlib ($newver-1) unstable; urgency=low\\
33 \\
34   * Update to v$newver\\
35 \\
36  -- Eric Biggers <ebiggers3@gmail.com>  $(date -R)\\
37 " debian/changelog
38
39 sed -i 's/\(Version:[[:space:]]*\)[^[:space:]]\+/\1'"$newver"'/' \
40                 rpm/*.spec