Skip to content
This repository has been archived by the owner on May 16, 2021. It is now read-only.

Commit

Permalink
Update bash installer to use zip
Browse files Browse the repository at this point in the history
  • Loading branch information
mainawycliffe committed May 31, 2020
1 parent abbe5cb commit 02e15a9
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,29 +18,29 @@ if [ $# -eq 0 ]; then
# download the latest executables for kamanda
kamanda_asset_path=$(
command curl -sSf https://github.com/mainawycliffe/kamanda/releases |
command grep -o "/mainawycliffe/kamanda/releases/download/.*/kamanda_.*_${platform}_${arch}.tar.gz" |
command grep -o "/mainawycliffe/kamanda/releases/download/.*/kamanda_.*_${platform}_${arch}.zip" |
command head -n 1
)
if [ ! "$kamanda_asset_path" ]; then exit 1; fi
downloadUrl="https://github.com/${kamanda_asset_path}"
else
# download the specific requested version for kamanda
downloadUrl="https://github.com/mainawycliffe/kamanda/releases/download/v${1}/kamanda_${1}_${platform}_${arch}.tar.gz"
downloadUrl="https://github.com/mainawycliffe/kamanda/releases/download/v${1}/kamanda_${1}_${platform}_${arch}.zip"
fi

binDir="/usr/local/bin"
filename="kamanda"

curl --fail --location --progress-bar "${downloadUrl}" --output "./${filename}.tar.gz"
curl --fail --location --progress-bar "${downloadUrl}" --output "./${filename}.zip"

# extract executables
tar xvzf kamanda.tar.gz
unzip kamanda.zip

# add to use executable dir, no permissions required
mv ${filename} ${binDir}

# delete the extra files
echo "Clean up the dowloads after installation"
rm "LICENSE" "README.md" "./${filename}.tar.gz"
rm "./${filename}.zip"

echo "Kamanda was installed successfully. You can find documentation here https://kamanda.dev"

0 comments on commit 02e15a9

Please sign in to comment.