Skip to content

Commit f793cef

Browse files
Add update-version.sh (#367)
1 parent 4b40d92 commit f793cef

File tree

1 file changed

+29
-0
lines changed

1 file changed

+29
-0
lines changed

update-version.sh

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
#!/bin/bash
2+
3+
tmpfile=$(mktemp)
4+
old_version=$1
5+
new_version=$2
6+
7+
if [ "$old_version" = "" ] || [ "$new_version" = "" ]; then
8+
echo "Error: Specify both the old version number and the new version number" > /dev/stderr
9+
exit 1
10+
fi
11+
12+
function update_versions_in_file()
13+
{
14+
cat $1 | sed -e "s/$old_version/$new_version/g" > $tmpfile
15+
cp $tmpfile $1
16+
}
17+
18+
# replace version strings
19+
update_versions_in_file configure.ac
20+
update_versions_in_file README.md
21+
update_versions_in_file README_JP.md
22+
update_versions_in_file libcobj/app/build.gradle.kts
23+
update_versions_in_file libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/Const.java
24+
update_versions_in_file tests/command-line-options.src/info-java-dir.at
25+
26+
# Rebuild
27+
autoreconf
28+
./configure --prefix=/usr/
29+
make

0 commit comments

Comments
 (0)