forked from kubeflow/model-registry
-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Added DSCI config * This commit corrects the order in which the DSCI is applied uses the correct default dsci needed for correct application * This commit adds a script to test if yq is installed and installs it if it isn't * This commit removes the script call as it is not needed
- Loading branch information
1 parent
164d7dc
commit 65cd8d8
Showing
2 changed files
with
33 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
#!/bin/bash | ||
|
||
install_yq_if_not_installed() { | ||
# Check operating system | ||
os=$(uname -s) | ||
case $os in | ||
Linux*) | ||
if ! command -v yq &>/dev/null; then | ||
echo "yq is not installed. Installing..." | ||
# Linux installation using curl | ||
sudo curl -L https://github.com/mikefarah/yq/releases/download/3.4.1/yq_linux_amd64 -o /usr/local/bin/yq && sudo chmod +x /usr/local/bin/yq | ||
else | ||
echo "yq is already installed." | ||
fi | ||
;; | ||
Darwin*) | ||
if ! command -v yq &>/dev/null; then | ||
echo "yq is not installed. Installing..." | ||
# macOS installation using Homebrew | ||
brew install yq | ||
else | ||
echo "yq is already installed." | ||
fi | ||
;; | ||
*) | ||
echo "Unsupported operating system: $os" | ||
;; | ||
esac | ||
} | ||
|
||
# Call the function when the script is sourced | ||
install_yq_if_not_installed |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters