@@ -13,25 +13,25 @@ update() {
13
13
file=" $SOURCE_DIR /$1 "
14
14
expr=" $2 "
15
15
16
- sed -e " $expr " " $file " > " $file .updated-version"
16
+ sed -e " $expr " " $file " > " $file .updated-version"
17
17
if diff " $file " " $file .updated-version" ; then
18
18
rm " $file .updated-version"
19
19
else
20
20
# use cat > and rm instead of move to keep file permissions
21
- cat " $file .updated-version" > " $file "
21
+ cat " $file .updated-version" > " $file "
22
22
rm " $file .updated-version"
23
23
fi
24
24
}
25
25
26
- update ' configure.ac' ' s/AC_INIT(\[tox\], \[.*\])/AC_INIT([tox], [' $VER ' ])/'
26
+ update ' configure.ac' ' s/AC_INIT(\[tox\], \[.*\])/AC_INIT([tox], [' " $VER " ' ])/'
27
27
28
- update ' toxcore/tox.api.h' ' s/\(const VERSION_MAJOR *= \).*;/\1' $MAJOR ' ;/'
29
- update ' toxcore/tox.api.h' ' s/\(const VERSION_MINOR *= \).*;/\1' $MINOR ' ;/'
30
- update ' toxcore/tox.api.h' ' s/\(const VERSION_PATCH *= \).*;/\1' $PATCH ' ;/'
28
+ update ' toxcore/tox.api.h' ' s/\(const VERSION_MAJOR *= \).*;/\1' " $MAJOR " ' ;/'
29
+ update ' toxcore/tox.api.h' ' s/\(const VERSION_MINOR *= \).*;/\1' " $MINOR " ' ;/'
30
+ update ' toxcore/tox.api.h' ' s/\(const VERSION_PATCH *= \).*;/\1' " $PATCH " ' ;/'
31
31
32
- update ' CMakeLists.txt' ' s/\(PROJECT_VERSION_MAJOR "\).*"/\1' $MAJOR ' "/'
33
- update ' CMakeLists.txt' ' s/\(PROJECT_VERSION_MINOR "\).*"/\1' $MINOR ' "/'
34
- update ' CMakeLists.txt' ' s/\(PROJECT_VERSION_PATCH "\).*"/\1' $PATCH ' "/'
32
+ update ' CMakeLists.txt' ' s/\(PROJECT_VERSION_MAJOR "\).*"/\1' " $MAJOR " ' "/'
33
+ update ' CMakeLists.txt' ' s/\(PROJECT_VERSION_MINOR "\).*"/\1' " $MINOR " ' "/'
34
+ update ' CMakeLists.txt' ' s/\(PROJECT_VERSION_PATCH "\).*"/\1' " $PATCH " ' "/'
35
35
36
36
#
37
37
# calculating the SO version
@@ -64,14 +64,14 @@ update 'CMakeLists.txt' 's/\(PROJECT_VERSION_PATCH "\).*"/\1'$PATCH'"/'
64
64
# this must be constant starting from the 1.0 release
65
65
LAST_SOMAJOR=2
66
66
67
- if [ $MAJOR -eq 0 ]; then
67
+ if [ " $MAJOR " -eq 0 ]; then
68
68
SOMAJOR=$MINOR
69
69
SOMINOR=$PATCH
70
70
71
71
# update lastmajor above
72
- update ' other/version-sync' ' s/^\(LAST_SOMAJOR=\).*/\1' $SOMAJOR ' /'
72
+ update ' other/version-sync' ' s/^\(LAST_SOMAJOR=\).*/\1' " $SOMAJOR " ' /'
73
73
else
74
- SOMAJOR=$( expr $MAJOR + $LAST_SOMAJOR )
74
+ SOMAJOR=$( expr " $MAJOR " + " $LAST_SOMAJOR " )
75
75
SOMINOR=$MINOR
76
76
fi
77
77
115
115
# <=> major.minor.patch
116
116
#
117
117
118
- if [ $MAJOR -eq 0 ]; then
119
- LIBTOOL_CURRENT=$( expr $SOMAJOR + $SOMINOR )
118
+ if [ " $MAJOR " -eq 0 ]; then
119
+ LIBTOOL_CURRENT=$( expr " $SOMAJOR " + " $SOMINOR " )
120
120
LIBTOOL_AGE=$SOMINOR
121
121
LIBTOOL_REVISION=0
122
122
else
123
- LIBTOOL_CURRENT=$( expr $SOMAJOR + $SOMINOR )
123
+ LIBTOOL_CURRENT=$( expr " $SOMAJOR " + " $SOMINOR " )
124
124
LIBTOOL_AGE=$SOMINOR
125
125
LIBTOOL_REVISION=$PATCH
126
126
fi
127
127
128
- update ' so.version' ' s/^\(CURRENT=\).*/\1' $LIBTOOL_CURRENT ' /'
129
- update ' so.version' ' s/^\(AGE=\).*/\1' $LIBTOOL_AGE ' /'
130
- update ' so.version' ' s/^\(REVISION=\).*/\1' $LIBTOOL_REVISION ' /'
128
+ update ' so.version' ' s/^\(CURRENT=\).*/\1' " $LIBTOOL_CURRENT " ' /'
129
+ update ' so.version' ' s/^\(AGE=\).*/\1' " $LIBTOOL_AGE " ' /'
130
+ update ' so.version' ' s/^\(REVISION=\).*/\1' " $LIBTOOL_REVISION " ' /'
0 commit comments