diff --git a/images/linux/scripts/installers/oc.sh b/images/linux/scripts/installers/oc.sh index 2310f33f0..911d73222 100644 --- a/images/linux/scripts/installers/oc.sh +++ b/images/linux/scripts/installers/oc.sh @@ -4,15 +4,17 @@ ## Desc: Installs the OC CLI ################################################################################ +source $HELPER_SCRIPTS/install.sh + # Install the oc CLI -curl "https://mirror.openshift.com/pub/openshift-v4/clients/oc/latest/linux/oc.tar.gz" > oc.tar.gz -tar xvzf oc.tar.gz -rm oc.tar.gz -mv oc /usr/local/bin +DOWNLOAD_URL="https://mirror.openshift.com/pub/openshift-v4/clients/ocp/latest/openshift-client-linux.tar.gz" +PACKAGE_TAR_NAME="oc.tar.gz" +download_with_retries $DOWNLOAD_URL "/tmp" $PACKAGE_TAR_NAME +tar xvzf "/tmp/$PACKAGE_TAR_NAME" -C "/usr/local/bin" # Validate the installation echo "Validate the installation" if ! command -v oc; then echo "oc was not installed" exit 1 -fi +fi \ No newline at end of file