-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
krew-index adjustments & add manual installation script
- Loading branch information
hadar-co
committed
Feb 6, 2022
1 parent
3a0d84e
commit bb2fd5b
Showing
3 changed files
with
37 additions
and
11 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
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
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,23 @@ | ||
# Install datree if it isn't installed | ||
if ! command -v datree &> /dev/null; then | ||
echo "Datree is not installed on your machine, proceeding to install..." | ||
curl https://get.datree.io | /bin/bash | ||
fi | ||
|
||
curl -L -O https://github.com/datreeio/kubectl-datree/releases/latest/download/kubectl-datree.zip 2> /dev/null | ||
|
||
PACKAGE_NAME="kubectl-datree.zip" | ||
PLUGIN_EXEC_NAME="kubectl-datree" | ||
|
||
mkdir bin | ||
unzip $PACKAGE_NAME -d bin > /dev/null | ||
|
||
sudo cp bin/$PLUGIN_EXEC_NAME /usr/local/bin/$PLUGIN_EXEC_NAME | ||
|
||
rm -rf bin && rm -rf $PACKAGE_NAME | ||
|
||
if [ -f /usr/local/bin/$PLUGIN_EXEC_NAME ]; then | ||
echo "Plugin installed successfully" | ||
else | ||
echo "Error occurred, please open a ticket in the github repository for assistance: https://github.com/datreeio/kubectl-datree" | ||
fi |