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