test
This commit is contained in:
parent
0e900c29cb
commit
d0b3177865
@ -14,13 +14,17 @@ fi
|
|||||||
echo "* Checking for topgrade binary"
|
echo "* Checking for topgrade binary"
|
||||||
topgrade_binary="/opt/topgrade/topgrade"
|
topgrade_binary="/opt/topgrade/topgrade"
|
||||||
topgrade_tar="/opt/topgrade/topgrade.tar.gz"
|
topgrade_tar="/opt/topgrade/topgrade.tar.gz"
|
||||||
topgrade_git_user="r-darwish"
|
topgrade_git_owner="r-darwish"
|
||||||
topgrade_git_repo="topgrade"
|
topgrade_git_repo="topgrade"
|
||||||
if [ ! -f "$topgrade_binary" ]; then
|
if [ ! -f "$topgrade_binary" ]; then
|
||||||
echo "** topgrade binary missing, installing now"
|
echo "** topgrade binary missing, installing now"
|
||||||
wget "https://github.com/r-darwish/topgrade/releases/download/v8.2.0/topgrade-v8.2.0-x86_64-unknown-linux-gnu.tar.gz" -O "$topgrade_tar"
|
newest_release=$(curl -sL https://api.github.com/repos/$topgrade_git_owner/$topgrade_git_repo/releases/latest | jq -r ".tag_name")
|
||||||
|
echo $newest_release
|
||||||
|
wget "https://github.com/$topgrade_git_owner/$topgrade_git_repo/releases/download/v8.2.0/topgrade-v8.2.0-x86_64-unknown-linux-gnu.tar.gz" -O "$topgrade_tar"
|
||||||
# curl -s -L "https://github.com/$topgrade_git_user/$topgrade_git_repo/releases/latest" | egrep -o '/$topgrade_git_user/$topgrade_git_repo/releases/download/[0-9]*/[0-9]*-x86_64-unknown-linux-gnu.tar.gz' | wget --base=http://github.com/ -i - -O "$topgrade_tar"
|
# curl -s -L "https://github.com/$topgrade_git_user/$topgrade_git_repo/releases/latest" | egrep -o '/$topgrade_git_user/$topgrade_git_repo/releases/download/[0-9]*/[0-9]*-x86_64-unknown-linux-gnu.tar.gz' | wget --base=http://github.com/ -i - -O "$topgrade_tar"
|
||||||
tar -xvf $topgrade_tar -C $topgrade_install_directory
|
tar -xvf $topgrade_tar -C $topgrade_install_directory
|
||||||
|
rm $topgrade_tar
|
||||||
|
chmod +x $topgrade_binary
|
||||||
else
|
else
|
||||||
echo "** topgrade binary exists"
|
echo "** topgrade binary exists"
|
||||||
fi
|
fi
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user