X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=jjb%2Finclude-raw-generate-p2pom.sh;h=05f54ef2c9c4099c31e6fe85d355c8a8ed83bf04;hb=e781ea36786462732170fb4ead81b39d930fc9bd;hp=8a9731703dab10264537d6e0fe213ed85568d045;hpb=ee9892826ee161ea854b4c5fd19ba4900e1917d8;p=releng%2Fbuilder.git diff --git a/jjb/include-raw-generate-p2pom.sh b/jjb/include-raw-generate-p2pom.sh index 8a9731703..05f54ef2c 100644 --- a/jjb/include-raw-generate-p2pom.sh +++ b/jjb/include-raw-generate-p2pom.sh @@ -1,5 +1,5 @@ #!/bin/bash -# @License EPL-1.0 +# SPDX-License-Identifier: EPL-1.0 ############################################################################## # Copyright (c) 2016 The Linux Foundation and others. # @@ -9,25 +9,25 @@ # http://www.eclipse.org/legal/epl-v10.html ############################################################################## -if [[ $P2ZIP_URL == "" ]]; then +if [[ "$P2ZIP_URL" == "" ]]; then P2ZIP_URL=opendaylight.snapshot/$(find . -name "*.zip" -type f -exec ls "{}" + | head -1) - FILE_NAME=`echo $P2ZIP_URL | awk -F'/' '{ print $NF }'` + FILE_NAME=$(echo "$P2ZIP_URL" | awk -F'/' '{ print $NF }') RELEASE_PATH="snapshot" else - FILE_NAME=`echo $P2ZIP_URL | awk -F'/' '{ print $NF }'` - VERSION=`echo $P2ZIP_URL | awk -F'/' '{ print $(NF-1) }'` + FILE_NAME=$(echo "$P2ZIP_URL" | awk -F'/' '{ print $NF }') + VERSION=$(echo "$P2ZIP_URL" | awk -F'/' '{ print $(NF-1) }') RELEASE_PATH="release/$VERSION" - wget --quiet $P2ZIP_URL -O $FILE_NAME + wget --quiet "$P2ZIP_URL" -O "$FILE_NAME" fi # If we detect a snapshot build then release to a snapshot repo # YangIDE has indicated that the only want the latest snapshot released to # the snapshot directory. -if echo $P2ZIP_URL | grep opendaylight.snapshot; then +if echo "$P2ZIP_URL" | grep opendaylight.snapshot; then RELEASE_PATH="snapshot" fi -cat > ${WORKSPACE}/pom.xml < "${WORKSPACE}/pom.xml" < 4.0.0 org.opendaylight.$PROJECT