commit fa60e056d8d93a9887adadf2f8c7bbebf9420c08 parent f4a17021fc41e818c57772825868ee1d3c34d7c9 Author: j pipkin <j@dawnrazor.net> Date: Sun, 22 Sep 2013 08:17:54 -0500 updated version in slackbuild/sbotools/sbotools.SlackBuild, created tools/update_versions.sh which should probably be merged with tools/update_man_pages.sh Diffstat:
| M | slackbuild/sbotools/sbotools.SlackBuild | | | 2 | +- |
| A | tools/update_versions.sh | | | 39 | +++++++++++++++++++++++++++++++++++++++ |
2 files changed, 40 insertions(+), 1 deletion(-)
diff --git 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 @@ -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