-
Notifications
You must be signed in to change notification settings - Fork 344
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Juraci Paixão Kröhling <[email protected]>
- Loading branch information
1 parent
c1f345b
commit b127fe7
Showing
2 changed files
with
23 additions
and
2 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,22 @@ | ||
#!/bin/bash | ||
|
||
DEST="${GOPATH}/bin/operator-sdk" | ||
|
||
function install_sdk() { | ||
echo "Downloading the operator-sdk ${SDK_VERSION} into ${DEST}" | ||
curl https://github.com/operator-framework/operator-sdk/releases/download/${SDK_VERSION}/operator-sdk-${SDK_VERSION}-x86_64-linux-gnu -sLo ${DEST} | ||
chmod +x ${DEST} | ||
} | ||
|
||
if [ ! -d ${GOPATH}/bin/ ]; then | ||
mkdir -p ${GOPATH}/bin | ||
fi | ||
|
||
if [ ! -f ${DEST} ]; then | ||
install_sdk | ||
fi | ||
|
||
${DEST} version | grep -q ${SDK_VERSION} | ||
if [ $? != 0 ]; then | ||
install_sdk | ||
fi |
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