-#!/bin/bash
+#!/bin/bash -l
# SPDX-License-Identifier: EPL-1.0
##############################################################################
# Copyright (c) 2017 The Linux Foundation and others.
set -x # Trace commands for this script to make debugging easier.
+set +f # Ensure filename expansion (globbing) is enabled
+
NEXUS_REPO=rpm.snapshots
release_path=TA/release-1
for artifact in \
`ls $results_dir/repo/*.rpm`
do
- if curl --head --fail $nexus_repo_url/$release_path/rpms/$(uname -m)/$(basename $artifact)
+ if curl -L --head --fail $nexus_repo_url/$release_path/rpms/$(uname -m)/$(basename $artifact)
then
echo "RPM - $(basename $artifact) already available in Nexus"
mv $results_dir/repo/$(basename $artifact) $results_dir/repo/duplicates/
for artifact in \
`ls $results_dir/src_repo/*.rpm`
do
- if curl --head --fail $nexus_repo_url/$release_path/rpms/Sources/$(basename $artifact)
+ if curl -L --head --fail $nexus_repo_url/$release_path/rpms/Sources/$(basename $artifact)
then
echo "Source RPM - $(basename $artifact) already available in Nexus"
mv $results_dir/src_repo/$(basename $artifact) $results_dir/src_repo/duplicates/