From 512e9b0ca198a86077217506d5fc0231040a299e Mon Sep 17 00:00:00 2001 From: Robert von Burg Date: Mon, 22 Sep 2014 21:04:18 +0200 Subject: [PATCH] [Project] fixing release.sh script --- li.strolch.dev/release.sh | 5 +++++ li.strolch.dev/setVersion.sh | 7 ++++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/li.strolch.dev/release.sh b/li.strolch.dev/release.sh index e7c50a8ff..d729af4d7 100755 --- a/li.strolch.dev/release.sh +++ b/li.strolch.dev/release.sh @@ -1,5 +1,10 @@ #!/bin/bash +if [ ! $(which xmlstarlet) ] ; then + echo "ERROR: xmlstarlet is missing!"s + exit 1 +fi + function usage() { echo "Usage: $0 [-c] [-p] [-r ] [-b ] [-o ] [-n ]" 1>&2; exit 1; diff --git a/li.strolch.dev/setVersion.sh b/li.strolch.dev/setVersion.sh index 9c80ed8f6..52ede6181 100755 --- a/li.strolch.dev/setVersion.sh +++ b/li.strolch.dev/setVersion.sh @@ -5,6 +5,11 @@ if [ "$#" != "2" ] ; then exit 1 fi +if [ ! $(which xmlstarlet) ] ; then + echo "ERROR: xmlstarlet is missing!"s + exit 1 +fi + #if ! mvn -f pom.xml versions:set -DnewVersion="${1}" -DallowSnapshots=true -DgenerateBackupPoms=false ; then # echo "ERROR: Failed to change version in root!" # exit 1 @@ -19,7 +24,7 @@ new_version="$2" declare SCRIPT_NAME="${0##*/}" declare SCRIPT_DIR="$(cd ${0%/*} ; pwd)" -root="${SCRIPT_DIR}" +root="$(cd ${SCRIPT_DIR}/.. ; pwd)" function fail() { echo -e "\nERROR: Failed to set version of $1"