Skip to content

Commit

Permalink
feat: making the install script more clear
Browse files Browse the repository at this point in the history
  • Loading branch information
deimosfr committed Dec 21, 2022
1 parent 855aafb commit 2777a2a
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,21 +3,28 @@
set -e
#set -x

echo "##################################"
echo "# #"
echo "# QOVERY CLI INSTALL #"
echo "# #"
echo "##################################"
echo ""

repo="Qovery/qovery-cli"
output_tgz="/tmp/qovery.tgz"
dest_binary="/usr/local/bin"
os=$(uname | tr '[:upper:]' '[:lower:]')

echo "Downloading Qovery CLI archive..."
echo "[+] Downloading Qovery CLI archive..."

latest_tag=$(curl --silent "https://api.github.com/repos/$repo/releases/latest" | grep '"tag_name":' | sed -E 's/.*"([^"]+)".*/\1/')
version=$(echo $latest_tag | sed 's/^v//')

test -f $output_tgz && rm -f $output_tgz
curl -o $output_tgz -sOL "https://github.com/${repo}/releases/download/${latest_tag}/qovery-cli_${version}_${os}_amd64.tar.gz"

echo "Uncompressing qovery binary in $dest_binary directory"
tar -xzf $output_tgz -C $dest_binary
echo "[+] Uncompressing qovery binary in $dest_binary directory (sudo permissions are required)"
sudo tar -xzf $output_tgz -C $dest_binary qovery
rm -f $output_tgz

echo -e "\nQovery CLI is installed, you can now use 'qovery' command line"

0 comments on commit 2777a2a

Please sign in to comment.