diff options
author | Sébastien Lesaint <sebastien.lesaint@sonarsource.com> | 2018-06-13 09:47:39 +0200 |
---|---|---|
committer | SonarTech <sonartech@sonarsource.com> | 2018-06-13 20:20:50 +0200 |
commit | 6d00d795cd6b1c0d34d1740ec958c407836c08ce (patch) | |
tree | 605a451e272b34cb3f66a996e0e9c72571975c21 /scripts | |
parent | 6ef18d84cd2f6dfc243b13cc6831a6b4b4f3c62b (diff) | |
download | sonarqube-6d00d795cd6b1c0d34d1740ec958c407836c08ce.tar.gz sonarqube-6d00d795cd6b1c0d34d1740ec958c407836c08ce.zip |
[scripts] drop now useless targetDirOf function in edition.sh
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/editions.sh | 11 | ||||
-rwxr-xr-x | scripts/logs.sh | 4 | ||||
-rwxr-xr-x | scripts/start.sh | 12 | ||||
-rwxr-xr-x | scripts/stop.sh | 4 |
4 files changed, 10 insertions, 21 deletions
diff --git a/scripts/editions.sh b/scripts/editions.sh index 4f001c0617c..7ccad91acd5 100755 --- a/scripts/editions.sh +++ b/scripts/editions.sh @@ -48,14 +48,3 @@ baseFileNameOf() { exit 1 fi } - -targetDirOf() { - local edition="$1" - - if [ "$edition" = "oss" ]; then - echo "sonarqube-oss" - else - echo "unsupported edition $edition" - exit 1 - fi -} diff --git a/scripts/logs.sh b/scripts/logs.sh index f5078ee47fa..d7c567a6a31 100755 --- a/scripts/logs.sh +++ b/scripts/logs.sh @@ -90,9 +90,9 @@ if [ "$script_name" = "logs.sh" ]; then checkEditionArgument "$EDITION" checkLogArgument "$LOG" - SQ_HOME_WILDCARD="$(distributionDirOf "$EDITION")/$(targetDirOf "$EDITION")/sonarqube-*" + SQ_HOME_WILDCARD="$(distributionDirOf "$EDITION")/sonarqube-*" if ! ls ${SQ_HOME_WILDCARD} &> /dev/null; then - echo "$(targetDirOf "$EDITION") is not unpacked" + echo "$(baseFileNameOf "$EDITION") is not unpacked" exit 1 fi cd ${SQ_HOME_WILDCARD} diff --git a/scripts/start.sh b/scripts/start.sh index d6b6d7a7add..6e6b1ffabb5 100755 --- a/scripts/start.sh +++ b/scripts/start.sh @@ -59,14 +59,14 @@ stopAny cd "$(distributionDirOf "$EDITION")" -TARGET_DIR="$(targetDirOf "$EDITION")" -SH_FILE="${TARGET_DIR}/sonarqube-*/bin/$OS/sonar.sh" +SH_FILE="sonarqube-*/bin/$OS/sonar.sh" if ! ls ${SH_FILE} &> /dev/null; then - echo "Unpacking ${TARGET_DIR}..." - ZIP_FILE="$(baseFileNameOf "$EDITION")-*.zip" - unzip -qq ${ZIP_FILE} -d "${TARGET_DIR}" + BASE_FILE_NAME="$(baseFileNameOf "$EDITION")" + echo "Unpacking ${BASE_FILE_NAME}..." + ZIP_FILE="${BASE_FILE_NAME}-*.zip" + unzip -qq ${ZIP_FILE} fi -cd $(find ${TARGET_DIR}/sonarqube-* -type d | head -1) +cd $(find sonarqube-* -type d | head -1) SQ_HOME=$(pwd) cd "$ROOT" diff --git a/scripts/stop.sh b/scripts/stop.sh index 8c2cdd8a936..55f3757c30e 100755 --- a/scripts/stop.sh +++ b/scripts/stop.sh @@ -19,9 +19,9 @@ fi stopAny() { for edition in $EDITIONS; do - SONAR_SH="$(distributionDirOf "$edition")/$(targetDirOf "$edition")/sonarqube-*/bin/$OS/sonar.sh" + SONAR_SH="$(distributionDirOf "$edition")/sonarqube-*/bin/$OS/sonar.sh" if ls $SONAR_SH &> /dev/null; then - echo "$(targetDirOf "$edition") is unpacked" + echo "$(baseFileNameOf "$edition") is unpacked" sh $SONAR_SH stop fi done |