mirror of
https://github.com/gravitl/netmaker.git
synced 2025-02-27 17:42:57 +08:00
Merge pull request #419 from pete1019/patch-6
check if files exists, if not get from latest
This commit is contained in:
commit
b9673da846
1 changed files with 8 additions and 1 deletions
|
@ -93,7 +93,14 @@ esac
|
||||||
|
|
||||||
echo "Binary = $dist"
|
echo "Binary = $dist"
|
||||||
|
|
||||||
wget -nv -O netclient https://github.com/gravitl/netmaker/releases/download/$VERSION/$dist
|
url="https://github.com/gravitl/netmaker/releases/download/$VERSION/$dist"
|
||||||
|
if curl --output /dev/null --silent --head --fail "$url"; then
|
||||||
|
echo "Downloading $dist $VERSION"
|
||||||
|
wget -nv -O netclient $url
|
||||||
|
else
|
||||||
|
echo "Downloading $dist latest"
|
||||||
|
wget -nv -O netclient https://github.com/gravitl/netmaker/releases/download/latest/$dist
|
||||||
|
fi
|
||||||
chmod +x netclient
|
chmod +x netclient
|
||||||
sudo ./netclient join -t $KEY
|
sudo ./netclient join -t $KEY
|
||||||
rm -f netclient
|
rm -f netclient
|
||||||
|
|
Loading…
Reference in a new issue