From 03ed685b0804e066d2d38559cfe0cdd80c9e510c Mon Sep 17 00:00:00 2001 From: Avi Miller Date: Fri, 2 Feb 2024 13:50:45 +1100 Subject: [PATCH] fix: minor fixes to align all three build versions Signed-off-by: Avi Miller --- oraclelinux7/build-rhsm-ol7.sh | 2 +- oraclelinux7/scripts/build-rhsm.sh | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/oraclelinux7/build-rhsm-ol7.sh b/oraclelinux7/build-rhsm-ol7.sh index e8a75f6..19f76fa 100755 --- a/oraclelinux7/build-rhsm-ol7.sh +++ b/oraclelinux7/build-rhsm-ol7.sh @@ -4,7 +4,7 @@ # Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl/ # # find the latest upstream version of the subscription-manager RPM -RHSM_NVR=$(docker run --rm -it -v "$PWD/scripts:/scripts registry.access.redhat.com/ubi7/ubi rpm" -q --queryformat="%{VERSION}:%{RELEASE}" subscription-manager) +RHSM_NVR=$(docker run --rm -it registry.access.redhat.com/ubi7/ubi rpm -q --queryformat="%{VERSION}:%{RELEASE}" subscription-manager) RHSM_VERSION=$(echo "$RHSM_NVR" | cut -d: -f1) RHSM_REL=$(echo "$RHSM_NVR" | cut -d: -f2) RHSM_RELEASE=$(echo "$RHSM_REL" | cut -d. -f1) diff --git a/oraclelinux7/scripts/build-rhsm.sh b/oraclelinux7/scripts/build-rhsm.sh index a69a954..ec8965d 100755 --- a/oraclelinux7/scripts/build-rhsm.sh +++ b/oraclelinux7/scripts/build-rhsm.sh @@ -39,5 +39,7 @@ if [ -f /gpg/key.asc ] && [ -f /gpg/passphrase ] && [ "$GPG_NAME_EMAIL" ]; then fi # Copy the RPMs to the output location -mkdir /output/oraclelinux7 -cp -r /root/rpmbuild/RPMS/* /output/oraclelinux7/ +if [ ! -d /output/oraclelinux7 ]; then + mkdir /output/oraclelinux7 +fi +cp -rf /root/rpmbuild/RPMS/* /output/oraclelinux7/