From da2796a083e9a2d14092e468139e0c67386eae66 Mon Sep 17 00:00:00 2001 From: Janos Gyerik Date: Wed, 11 May 2016 17:47:26 +0200 Subject: [PATCH] Minor Bash improvements (#951) * set exec bit on .sh files where it was not * replace legacy `...` with $(...) * use here-document instead of many echos --- cix.sh | 10 +++--- find-classpath-conflicts.sh | 0 jacoco-build.sh | 0 quick-build.sh | 72 +++++++++++++++++++------------------ 4 files changed, 42 insertions(+), 40 deletions(-) mode change 100644 => 100755 find-classpath-conflicts.sh mode change 100644 => 100755 jacoco-build.sh diff --git a/cix.sh b/cix.sh index 4dc1e6d598b..2b0b78c5e53 100755 --- a/cix.sh +++ b/cix.sh @@ -6,20 +6,20 @@ set -euo pipefail case "$RUN_ACTIVITY" in run-db-unit-tests-*) - DB_ENGINE=`echo $RUN_ACTIVITY | sed "s/run-db-unit-tests-//g"` + DB_ENGINE=$(echo $RUN_ACTIVITY | sed "s/run-db-unit-tests-//g") ./run-db-unit-tests.sh "http://infra.internal.sonarsource.com/jenkins/orch-${DB_ENGINE}.properties" ;; run-db-integration-tests-*) - DB_ENGINE=`echo $RUN_ACTIVITY | sed "s/run-db-integration-tests-//g" | cut -d \- -f 1` - CATEGORY=`echo $RUN_ACTIVITY | sed "s/run-db-integration-tests-//g" | cut -d \- -f 2` + DB_ENGINE=$(echo $RUN_ACTIVITY | sed "s/run-db-integration-tests-//g" | cut -d \- -f 1) + CATEGORY=$(echo $RUN_ACTIVITY | sed "s/run-db-integration-tests-//g" | cut -d \- -f 2) ./run-integration-tests.sh "${CATEGORY}" "http://infra.internal.sonarsource.com/jenkins/orch-${DB_ENGINE}.properties" ;; run-integration-tests-*) - CATEGORY=`echo $RUN_ACTIVITY | sed "s/run-integration-tests-//g"` + CATEGORY=$(echo $RUN_ACTIVITY | sed "s/run-integration-tests-//g") ./run-integration-tests.sh "${CATEGORY}" "http://infra.internal.sonarsource.com/jenkins/orch-embedded.properties" ;; @@ -33,7 +33,7 @@ case "$RUN_ACTIVITY" in ;; run-upgrade-tests-*) - DB_ENGINE=`echo $RUN_ACTIVITY | sed "s/run-upgrade-tests-//g"` + DB_ENGINE=$(echo $RUN_ACTIVITY | sed "s/run-upgrade-tests-//g") ./run-upgrade-tests.sh "http://infra.internal.sonarsource.com/jenkins/orch-${DB_ENGINE}.properties" ;; diff --git a/find-classpath-conflicts.sh b/find-classpath-conflicts.sh old mode 100644 new mode 100755 diff --git a/jacoco-build.sh b/jacoco-build.sh old mode 100644 new mode 100755 diff --git a/quick-build.sh b/quick-build.sh index 8ff49597121..756015c15bb 100755 --- a/quick-build.sh +++ b/quick-build.sh @@ -2,41 +2,43 @@ export MAVEN_OPTS='-Xmx256m' -echo '' -echo '' -echo ' uuuuuuu' -echo ' uu$$$$$$$$$$$uu' -echo ' uu$$$$$$$$$$$$$$$$$uu' -echo ' u$$$$$$$$$$$$$$$$$$$$$u' -echo ' u$$$$$$$$$$$$$$$$$$$$$$$u' -echo ' u$$$$$$$$$$$$$$$$$$$$$$$$$u' -echo ' u$$$$$$$$$$$$$$$$$$$$$$$$$u' -echo ' u$$$$$$" "$$$" "$$$$$$u' -echo ' "$$$$" u$u $$$$"' -echo ' $$$u u$u u$$$' -echo ' $$$u u$$$u u$$$' -echo ' "$$$$uu$$$ $$$uu$$$$"' -echo ' "$$$$$$$" "$$$$$$$"' -echo ' u$$$$$$$u$$$$$$$u' -echo ' u$"$"$"$"$"$"$u' -echo ' uuu $$u$ $ $ $ $u$$ uuu' -echo ' u$$$$ $$$$$u$u$u$$$ u$$$$' -echo ' $$$$$uu "$$$$$$$$$" uu$$$$$$' -echo 'u$$$$$$$$$$$uu """"" uuuu$$$$$$$$$$' -echo '$$$$"""$$$$$$$$$$uuu uu$$$$$$$$$"""$$$"' -echo ' """ ""$$$$$$$$$$$uu ""$"""' -echo ' uuuu ""$$$$$$$$$$uuu' -echo ' u$$$uuu$$$$$$$$$uu ""$$$$$$$$$$$uuu$$$' -echo ' $$$$$$$$$$"""" ""$$$$$$$$$$$"' -echo ' "$$$$$" ""$$$$""' -echo ' $$$" $$$$"' -echo '' -echo '' -echo ' TESTS ARE DISABLED' -echo ' ARE U CRAZY ?' -echo '' -echo '' -echo '' +cat << 'EOF' + + + uuuuuuu + uu$$$$$$$$$$$uu + uu$$$$$$$$$$$$$$$$$uu + u$$$$$$$$$$$$$$$$$$$$$u + u$$$$$$$$$$$$$$$$$$$$$$$u + u$$$$$$$$$$$$$$$$$$$$$$$$$u + u$$$$$$$$$$$$$$$$$$$$$$$$$u + u$$$$$$" "$$$" "$$$$$$u + "$$$$" u$u $$$$" + $$$u u$u u$$$ + $$$u u$$$u u$$$ + "$$$$uu$$$ $$$uu$$$$" + "$$$$$$$" "$$$$$$$" + u$$$$$$$u$$$$$$$u + u$"$"$"$"$"$"$u + uuu $$u$ $ $ $ $u$$ uuu + u$$$$ $$$$$u$u$u$$$ u$$$$ + $$$$$uu "$$$$$$$$$" uu$$$$$$ +u$$$$$$$$$$$uu """"" uuuu$$$$$$$$$$ +$$$$"""$$$$$$$$$$uuu uu$$$$$$$$$"""$$$" + """ ""$$$$$$$$$$$uu ""$""" + uuuu ""$$$$$$$$$$uuu + u$$$uuu$$$$$$$$$uu ""$$$$$$$$$$$uuu$$$ + $$$$$$$$$$"""" ""$$$$$$$$$$$" + "$$$$$" ""$$$$"" + $$$" $$$$" + + + TESTS ARE DISABLED + ARE U CRAZY ? + + + +EOF ./stop.sh mvn clean install -B -e -V -DskipTests=true -Dsource.skip=true -Denforcer.skip=true -Pdev $* -- 2.39.5