diff options
author | Sébastien Lesaint <sebastien.lesaint@sonarsource.com> | 2018-05-30 16:10:05 +0200 |
---|---|---|
committer | SonarTech <sonartech@sonarsource.com> | 2018-06-12 20:21:01 +0200 |
commit | 7e59b1e27f80a5d466913a3b9040ee82d1ae2e52 (patch) | |
tree | 08b5777d40923468cefe2fc455bd3f4233ea267b /scripts/generate_batch_reports.sh | |
parent | 77f771b0411d1d5bc92b757bad1bcbc18921e6b4 (diff) | |
download | sonarqube-7e59b1e27f80a5d466913a3b9040ee82d1ae2e52.tar.gz sonarqube-7e59b1e27f80a5d466913a3b9040ee82d1ae2e52.zip |
[scripts] declare bash function in portable fashion
Diffstat (limited to 'scripts/generate_batch_reports.sh')
-rwxr-xr-x | scripts/generate_batch_reports.sh | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/scripts/generate_batch_reports.sh b/scripts/generate_batch_reports.sh index 247fd1580f2..acd64769c28 100755 --- a/scripts/generate_batch_reports.sh +++ b/scripts/generate_batch_reports.sh @@ -16,11 +16,11 @@ set -euo pipefail -function clean() { +clean() { rm -Rf $BUILD_DIR } -function createPrivateClone() { +createPrivateClone() { BRANCH=$(git symbolic-ref -q HEAD) BRANCH=${BRANCH##refs/heads/} BRANCH=${BRANCH:-HEAD} @@ -39,7 +39,7 @@ function createPrivateClone() { cd ${BUILD_DIR}${RELATIVE_PATH} } -function showHelp() { +showHelp() { echo "Usage: $0 -d DIR_PATH [ -l integer ] [ -h URL ] [ -u string ] [ -p string ] -d : path to directory where batch report bumpds will be created -l : number of commit in the past (optional: default is $HISTORY_LENGTH) @@ -48,7 +48,7 @@ function showHelp() { -p : password to authentication on the SQ instance (optional: default is $SONAR_USER)" } -function checkOptions() { +checkOptions() { if [[ -z "$DUMP_DIR" ]]; then >&2 echo "-d option is mandatory" showHelp |