Files
runner-images/images/linux/scripts/installers/oc.sh
2020-10-12 15:47:09 +05:00

19 lines
532 B
Bash

#!/bin/bash -e
################################################################################
## File: oc.sh
## Desc: Installs the OC CLI
################################################################################
# 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
# Validate the installation
echo "Validate the installation"
if ! command -v oc; then
echo "oc was not installed"
exit 1
fi