forked from scalaris-team/scalaris
-
Notifications
You must be signed in to change notification settings - Fork 0
/
bootstrap.sh
executable file
·58 lines (53 loc) · 2.2 KB
/
bootstrap.sh
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
#!/bin/bash
# Copyright 2007-2015 Zuse Institute Berlin
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
## update version ##
VERSION=`cat VERSION`
VERSION_NOPLUS=`echo "${VERSION}" | tr + _`
echo "Setting Scalaris version to ${VERSION}..."
sed -e "s/-define(SCALARIS_VERSION, \".*\")\\./-define(SCALARIS_VERSION, \"${VERSION}\")./g" \
-i include/scalaris.hrl
sed -e "s/AC_INIT(scalaris, .*, scalaris@googlegroups.com)/AC_INIT(scalaris, ${VERSION}, scalaris@googlegroups.com)/g" \
-i configure.ac
sed -e "s/public static final String version = \".*\";/public static final String version = \"${VERSION}\";/g" \
-i contrib/wikipedia/src/de/zib/scalaris/examples/wikipedia/bliki/WikiServlet.java
sed -e "s/version='.*',/version='${VERSION}',/g" \
-i python-api/setup.py
sed -e "s/SCALARIS_VERSION=\".*\"/SCALARIS_VERSION=\"${VERSION}\"/g" \
-i contrib/packages/*/checkout.sh
sed -e "s/%define pkg_version .*/%define pkg_version ${VERSION}/g" \
-i contrib/packages/*/*.spec
sed -e "s/Version: .*-.*/Version: ${VERSION}-1/g" \
-i contrib/packages/*/*.dsc
sed -e "0,/(.*-.*)/s//(${VERSION}-1)/" \
-i contrib/packages/*/debian.changelog
sed -e "0,/<version>.*<\/version>/s//<version>${VERSION}<\/version>/" \
-i java-api/pom.xml
sed -e "s/module scalaris .*;/module scalaris ${VERSION_NOPLUS};/g" \
-i contrib/systemd/scalaris.te
if [[ "$VERSION" == *git* ]]; then
RELEASE="unstable"
else
RELEASE="stable"
fi
sed -e "0,/u*n*stable;/s//${RELEASE};/" \
-i contrib/packages/*/debian.changelog
echo "done"
sed -e "s/pkgver=.*/pkgver=${VERSION}/g" \
-i contrib/packages/*/PKGBUILD
##########
echo "Creating configure script"
aclocal -Wobsolete
autoconf -Wobsolete
echo "done"