aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/assembly/bin/sonar-scanner
diff options
context:
space:
mode:
authorMark Rekveld <mark.rekveld@sonarsource.com>2020-09-24 08:29:18 +0200
committerGitHub <noreply@github.com>2020-09-24 08:29:18 +0200
commit4a8d1e3fda2a772671383ac6f6201a6b97605ac1 (patch)
treea94504cdaea34e69dfb9b14328f31e1431f5f25e /src/main/assembly/bin/sonar-scanner
parent31dca6f1920a3468794a93e04b8dff30673e31e4 (diff)
downloadsonar-scanner-cli-4a8d1e3fda2a772671383ac6f6201a6b97605ac1.tar.gz
sonar-scanner-cli-4a8d1e3fda2a772671383ac6f6201a6b97605ac1.zip
SQSCANNER-78 - backtick syntax (#83)
Diffstat (limited to 'src/main/assembly/bin/sonar-scanner')
-rwxr-xr-xsrc/main/assembly/bin/sonar-scanner20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/main/assembly/bin/sonar-scanner b/src/main/assembly/bin/sonar-scanner
index e0e4c9d..56f0ce5 100755
--- a/src/main/assembly/bin/sonar-scanner
+++ b/src/main/assembly/bin/sonar-scanner
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/usr/bin/env sh
#
# SonarScanner Startup Script for Unix
#
@@ -12,21 +12,21 @@ real_path () {
(
while true; do
- cd "$(dirname "$target")"
- target=$(basename "$target")
+ cd "`dirname "$target"`"
+ target=`basename "$target"`
test -L "$target" || break
- target=$(readlink "$target")
+ target=`readlink "$target"`
done
- echo "$(pwd -P)/$target"
+ echo "`pwd -P`/$target"
)
}
-script_path=$(real_path "$0")
-sonar_scanner_home=$(dirname "$script_path")/..
+script_path=`real_path "$0"`
+sonar_scanner_home=`dirname "$script_path"`/..
# make it fully qualified
-sonar_scanner_home=$(cd "$sonar_scanner_home" && pwd -P)
+sonar_scanner_home=`cd "$sonar_scanner_home" && pwd -P`
jar_file=$sonar_scanner_home/lib/sonar-scanner-cli-${project.version}.jar
@@ -46,7 +46,7 @@ if [ -n "$JAVA_HOME" ]
then
java_cmd="$JAVA_HOME/bin/java"
else
- java_cmd="$(which java)"
+ java_cmd="`which java`"
fi
if [ -z "$java_cmd" -o ! -x "$java_cmd" ] ; then
@@ -54,7 +54,7 @@ if [ -z "$java_cmd" -o ! -x "$java_cmd" ] ; then
exit 1
fi
-project_home=$(pwd)
+project_home=`pwd`
#echo "Info: Using sonar-scanner at $sonar_scanner_home"
#echo "Info: Using java at $java_cmd"