Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 29 additions & 0 deletions update-version.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
#!/bin/bash

tmpfile=$(mktemp)
old_version=$1
new_version=$2

if [ "$old_version" = "" ] || [ "$new_version" = "" ]; then
echo "Error: Specify both the old version number and the new version number" > /dev/stderr
exit 1
fi

function update_versions_in_file()
{
cat $1 | sed -e "s/$old_version/$new_version/g" > $tmpfile
cp $tmpfile $1
}

# replace version strings
update_versions_in_file configure.ac
update_versions_in_file README.md
update_versions_in_file README_JP.md
update_versions_in_file libcobj/app/build.gradle.kts
update_versions_in_file libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/Const.java
update_versions_in_file tests/command-line-options.src/info-java-dir.at

# Rebuild
autoreconf
./configure --prefix=/usr/
make