diff options
| -rw-r--r-- | slackbuild/sbotools/sbotools.SlackBuild | 2 | ||||
| -rwxr-xr-x | tools/update_versions.sh | 39 | 
2 files changed, 40 insertions, 1 deletions
| diff --git a/slackbuild/sbotools/sbotools.SlackBuild b/slackbuild/sbotools/sbotools.SlackBuild index cb703f8..6f296e5 100644 --- a/slackbuild/sbotools/sbotools.SlackBuild +++ b/slackbuild/sbotools/sbotools.SlackBuild @@ -5,7 +5,7 @@  # Licensed under the WTFPL <http://sam.zoy.org/wtfpl/COPYING>  PRGNAM=sbotools -VERSION=${VERSION:-1.6} +VERSION=${VERSION:-1.7}  BUILD=${BUILD:-1}  TAG=${TAG:-_SBo} diff --git a/tools/update_versions.sh b/tools/update_versions.sh new file mode 100755 index 0000000..8271dfd --- /dev/null +++ b/tools/update_versions.sh @@ -0,0 +1,39 @@ +#!/bin/sh + +usage_exit() { +	echo "Usage: $(basename $0) (-g) version" +	exit 1 +} + +if [[ "$1" == "" ]]; then +	usage_exit +fi + +if [[ "$1" == "-g" ]]; then +	git=true +	shift +fi + +if [[ "$1" == "" ]]; then +	usage_exit +fi + +version="$1" + +update=" +	SBO-Lib/lib/SBO/Lib.pm +	slackbuild/sbotools/sbotools.SlackBuild +" + +old_version=$(grep '^our $VERSION' SBO-Lib/lib/SBO/Lib.pm \ +	| grep -Eo '[0-9]+(\.[0-9]+){0,1}') +echo $old_version + +tmpfile=$(mktemp /tmp/XXXXXXXXXX) + +for i in $update; do +	cat $i | sed "s/$old_version/$version/g" > $tmpfile +	if [[ "$?" == "0" ]]; then +		mv $tmpfile $i +	fi +done | 
