Skip to content

Commit

Permalink
Minor fixes in arlon setup script (#288)
Browse files Browse the repository at this point in the history
* Minor fixes in arlon setup script

* Download the latest arlon binary
  • Loading branch information
ShaunakJoshi1407 authored Nov 8, 2022
1 parent cd05a7c commit 5d81c21
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions setup_arlon.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ if [[ "$OSTYPE" == "linux-gnu"* ]]; then
os="linux"
arlon_os="Linux"
elif [[ "$OSTYPE" == "darwin"* ]]; then
os="darwin"
os="darwin"
arlon_os="Darwin"
fi
cpu=$(uname -m)
Expand Down Expand Up @@ -131,10 +131,12 @@ echo Arlon controller is up and running

if ! which arlon &> /dev/null; then
echo Downloading arlon CLI
wget -qc https://github.com/arlonproj/arlon/releases/download/v0.9.10/arlon_${arlon_os}_${arlon_arch}_0.9.10.tar.gz
tar -xf arlon_${arlon_os}_${arlon_arch}_0.9.10.tar.gz
mv arlon_${os}_${arch}_v0.9.10 ${HOME}/.local/bin/arlon
rm arlon_${arlon_os}_${arlon_arch}_0.9.10.tar.gz
latestRelease=$(curl -L -s -H 'Accept: application/json' https://github.com/arlonproj/arlon/releases/latest)
latestVersion=$(echo $latestRelease | sed -e 's/.*"tag_name":"\([^"]*\)".*/\1/')
wget -qc https://github.com/arlonproj/arlon/releases/download/${latestVersion}/arlon_${arlon_os}_${arlon_arch}_${latestVersion}.tar.gz
tar -xf arlon_${arlon_os}_${arlon_arch}_${latestVersion}.tar.gz
mv arlon_${os}_${arch}_${latestVersion} ${HOME}/.local/bin/arlon
rm arlon_${arlon_os}_${arlon_arch}_${latestVersion}.tar.gz
fi


Expand Down

0 comments on commit 5d81c21

Please sign in to comment.