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/