From 4e494e6bf70108968f052cd4ce1d8379fee04a43 Mon Sep 17 00:00:00 2001 From: Thanh Ha Date: Mon, 2 Oct 2017 17:34:58 -0400 Subject: [PATCH] Fix unescaped * in if-statement Change-Id: I8e45a1adc13f4da0e7386371678f6364670f5c38 Signed-off-by: Thanh Ha --- .jjb-test/expected-xml/gerrit-ciman-jjb-deploy-job | 2 +- .jjb-test/expected-xml/github-ciman-jjb-deploy-job | 2 +- shell/jjb-deploy-job.sh | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.jjb-test/expected-xml/gerrit-ciman-jjb-deploy-job b/.jjb-test/expected-xml/gerrit-ciman-jjb-deploy-job index fa7cca57..80597b98 100644 --- a/.jjb-test/expected-xml/gerrit-ciman-jjb-deploy-job +++ b/.jjb-test/expected-xml/gerrit-ciman-jjb-deploy-job @@ -249,7 +249,7 @@ COMMENT="${GERRIT_EVENT_COMMENT_TEXT:-$ghprbCommentBody}" JOB_NAME=$(echo "$COMMENT" | grep jjb-deploy | awk '{print $2}') # Strip all * characters to prevent pushing all jobs to Jenkins -if [ -z "${JOB_NAME//*/}" ]; then +if [ -z "${JOB_NAME//\*/}" ]; then echo "ERROR: JOB_NAME cannot be empty or '*'." exit 1 fi diff --git a/.jjb-test/expected-xml/github-ciman-jjb-deploy-job b/.jjb-test/expected-xml/github-ciman-jjb-deploy-job index a214b2df..b364dde7 100644 --- a/.jjb-test/expected-xml/github-ciman-jjb-deploy-job +++ b/.jjb-test/expected-xml/github-ciman-jjb-deploy-job @@ -217,7 +217,7 @@ COMMENT="${GERRIT_EVENT_COMMENT_TEXT:-$ghprbCommentBody}" JOB_NAME=$(echo "$COMMENT" | grep jjb-deploy | awk '{print $2}') # Strip all * characters to prevent pushing all jobs to Jenkins -if [ -z "${JOB_NAME//*/}" ]; then +if [ -z "${JOB_NAME//\*/}" ]; then echo "ERROR: JOB_NAME cannot be empty or '*'." exit 1 fi diff --git a/shell/jjb-deploy-job.sh b/shell/jjb-deploy-job.sh index c7b8d8d7..3db95062 100644 --- a/shell/jjb-deploy-job.sh +++ b/shell/jjb-deploy-job.sh @@ -27,7 +27,7 @@ COMMENT="${GERRIT_EVENT_COMMENT_TEXT:-$ghprbCommentBody}" JOB_NAME=$(echo "$COMMENT" | grep jjb-deploy | awk '{print $2}') # Strip all * characters to prevent pushing all jobs to Jenkins -if [ -z "${JOB_NAME//*/}" ]; then +if [ -z "${JOB_NAME//\*/}" ]; then echo "ERROR: JOB_NAME cannot be empty or '*'." exit 1 fi -- 2.16.6