Chore: Upgrade Jenkins-job-builder to 6.3.0
[releng/global-jjb.git] / shell / license-check.sh
index 8466cf9..31290c3 100644 (file)
@@ -45,7 +45,11 @@ if hash lhc 2>/dev/null; then
 else
     echo "License Header Checker is not installed. Installing..."
     mkdir "$WORKSPACE/bin"
-    wget -nv -O "/tmp/lhc.tar.gz" "https://nexus.opendaylight.org/content/repositories/hosted_installers/org/linuxfoundation/lhc/${lhc_version}/lhc-${lhc_version}.tar.gz"
+    NEXUS_BASEURL="https://nexus.opendaylight.org/"
+    NEXUS_PATH="content/repositories/hosted_installers/org/linuxfoundation/"
+    NEXUS_LHC="lhc/${lhc_version}/lhc-${lhc_version}.tar.gz"
+    NEXUS_URL="${NEXUS_BASEURL}${NEXUS_PATH}${NEXUS_LHC}"
+    wget -nv -O "/tmp/lhc.tar.gz" "$NEXUS_URL"
     tar -zxvf /tmp/lhc.tar.gz -C "$WORKSPACE/bin"
     chmod +x "$WORKSPACE/bin/lhc"
     export PATH="$WORKSPACE/bin:$PATH"
@@ -56,7 +60,7 @@ fi
 set -f  # Disable globbing for $file_patterns to pass '*'
 # Purposely disable SC2068 for $file_patterns
 # shellcheck disable=SC2068
-lhc --license "$licenses_allowed" ${disable_spdx} \
+lhc --license "$licenses_allowed" "${disable_spdx}" \
     --exclude "$license_exclude_paths" \
     ${file_patterns[@]}
 set +f