diff --git a/scripts/04_disconnected_olm.sh b/scripts/04_disconnected_olm.sh index 3c7f503..ee7eba6 100755 --- a/scripts/04_disconnected_olm.sh +++ b/scripts/04_disconnected_olm.sh @@ -40,7 +40,8 @@ podman login -u "$RHN_USER" -p "$RHN_PASSWORD" registry.redhat.io which oc-mirror >/dev/null 2>&1 if [ "$?" != "0" ] ; then - curl -sL https://mirror.openshift.com/pub/openshift-v4/x86_64/clients/ocp/4.13.12/oc-mirror.tar.gz | tar xvz -C /usr/bin + LONG_RELEASE=$(cat /root/version.txt | awk -F: '{print $NF}' | cut -d- -f1) + curl -sL https://mirror.openshift.com/pub/openshift-v4/x86_64/clients/ocp/$LONG_RELEASE/oc-mirror.tar.gz | tar xvz -C /usr/bin chmod +x /usr/bin/oc-mirror fi