sbotools2

Maintenance fork of the original sbotools version 2
Log | Files | Refs | README

commit 7a9427748e17db29fb1bd4d2703d0d964f64f379
parent af1f5829a2b8181fc005acdafaa4cc52e5ae320b
Author: Andreas Guldstrand <andreas.guldstrand@gmail.com>
Date:   Fri,  4 Dec 2015 13:49:01 +0100

Update version handling in tools/

Diffstat:
Mtools/htmlgen.sh | 2+-
Mtools/package_up.sh | 2+-
Mtools/update_man_pages.sh | 14+++++++-------
Mtools/update_versions.sh | 3+--
4 files changed, 10 insertions(+), 11 deletions(-)

diff --git a/tools/htmlgen.sh b/tools/htmlgen.sh @@ -7,7 +7,7 @@ fi DESTDIR=$1 PACKAGE="sbotools" -VERSION=$(grep '^our $VERSION' SBO-Lib/lib/SBO/Lib.pm | grep -Eo '[0-9]+(\.[0-9]+){0,1}') +VERSION=$(grep '^our $VERSION' SBO-Lib/lib/SBO/Lib.pm | grep -Eo '[0-9]+(\.[0-9RC]+){0,1}') SBO_DIR=`pwd` diff --git a/tools/package_up.sh b/tools/package_up.sh @@ -2,7 +2,7 @@ DOWNLOADDIR="$1" PACKAGE="sbotools" -VERSION=$(grep '^our $VERSION' SBO-Lib/lib/SBO/Lib.pm | grep -Eo '[0-9]+(\.[0-9]+){0,1}') +VERSION=$(grep '^our $VERSION' SBO-Lib/lib/SBO/Lib.pm | grep -Eo '[0-9]+(\.[0-9RC]+){0,1}') FILENAME=$PACKAGE-$VERSION.tar.gz echo "Making package for $PACKAGE-$VERSION." \ diff --git a/tools/update_man_pages.sh b/tools/update_man_pages.sh @@ -1,11 +1,15 @@ #!/bin/sh usage_exit() { - echo "Usage: $(basename $0) (-d) (-g) version" + echo "Usage: $(basename $0) (-d) (-g)" exit 1 } -if [[ "$1" == "" ]]; then +if [[ "$1" == "-h" ]]; then + usage_exit +fi + +if [[ "$1" == "-?" ]]; then usage_exit fi @@ -19,11 +23,7 @@ if [[ "$1" == "-g" ]]; then shift fi -if [[ "$1" == "" ]]; then - usage_exit -fi - -version="$1" +VERSION=$(grep '^our $VERSION' SBO-Lib/lib/SBO/Lib.pm | grep -Eo '[0-9]+(\.[0-9RC]+){0,1}') if ! [[ -d "./man1" ]]; then echo "you do not seem to be at the right place to run this." diff --git a/tools/update_versions.sh b/tools/update_versions.sh @@ -26,8 +26,7 @@ update=" slackbuild/sbotools/sbotools.info " -old_version=$(grep '^our $VERSION' SBO-Lib/lib/SBO/Lib.pm \ - | grep -Eo '[0-9]+(\.[0-9]+){0,1}') +old_version=$(grep '^our $VERSION' SBO-Lib/lib/SBO/Lib.pm | grep -Eo '[0-9]+(\.[0-9RC]+){0,1}') tmpfile=$(mktemp /tmp/XXXXXXXXXX)