Browse Source

Simplify and modernize real_path

tags/3.1.0.1141
Janos Gyerik 6 years ago
parent
commit
06f92ea39d
1 changed files with 3 additions and 10 deletions
  1. 3
    10
      src/main/assembly/bin/sonar-scanner

+ 3
- 10
src/main/assembly/bin/sonar-scanner View File

@@ -14,22 +14,15 @@ real_path () {
while true; do
cd "$(dirname "$target")"
target=$(basename "$target")
link=$(readlink "$target")
test "$link" || break
target=$link
test -L "$target" || break
target=$(readlink "$target")
done

echo "$(pwd -P)/$target"
)
}

script_path="$0"

if [ -h "$script_path" ] ; then
# resolve recursively symlinks
script_path=$(real_path "$script_path")
fi

script_path=$(real_path "$0")
sonar_scanner_home=$(dirname "$script_path")/..

# make it fully qualified

Loading…
Cancel
Save