Skip to content

Instantly share code, notes, and snippets.

@nickboldt
Created October 26, 2023 13:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nickboldt/dc67965383b367870e484fcd822ed768 to your computer and use it in GitHub Desktop.
Save nickboldt/dc67965383b367870e484fcd822ed768 to your computer and use it in GitHub Desktop.
update dsc from a newer quay tag
#!/bin/bash
if [[ $1 ]]; then
DSC_VERSION="${1}"
else
DSC_VERSION="next"
fi
cd /tmp || exit;
curl -sSLO https://raw.githubusercontent.com/redhat-developer/devspaces-chectl/devspaces-3-rhel-8/build/scripts/installDscFromContainer.sh; chmod +x installDscFromContainer.sh
./installDscFromContainer.sh "quay.io/devspaces/dsc:${DSC_VERSION}" -t $HOME --verbose
DSC_HOME="${HOME}/dsc"
if [[ -d ${DSC_HOME}/bin ]]; then \
export PATH=${PATH%":${DSC_HOME}/bin"}:${DSC_HOME}/bin;
echo "Run this to update your path:"
echo "export PATH=${PATH%":${DSC_HOME}/bin"}:${DSC_HOME}/bin"
else \
echo "An error occurred installing dsc $DSC_VERSION for arch $DSC_ARCH ! Check if ${DSC_TGZ_URL} is a valid file."; \
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment