Remove Arch Linux PKGBUILD
[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 "1i\\
30 wimlib ($newver-1) unstable; urgency=low\\
31 \\
32   * Update to v$newver\\
33 \\
34  -- Eric Biggers <ebiggers3@gmail.com>  $(date -R)\\
35 " debian/changelog
36
37 sed -i 's/\(Version:[[:space:]]*\)[^[:space:]]\+/\1'"$newver"'/' \
38                 rpm/*.spec