mirror of
https://github.com/rclone/rclone
synced 2024-12-21 11:45:56 +01:00
version check in curl installation
This commit is contained in:
parent
b48b537325
commit
ab03f6e475
@ -9,9 +9,23 @@ if [ -n "$1" ] && [ "$1" != "beta" ]; then
|
||||
fi
|
||||
|
||||
if [ -n "$1" ]; then
|
||||
install_beta="yes"
|
||||
install_beta="beta "
|
||||
fi
|
||||
|
||||
#check installed version of rclone to determine if update is necessary
|
||||
version=`rclone --version | head -n 1`
|
||||
if [ -z "${install_beta}" ]; then
|
||||
current_version=`curl https://downloads.rclone.org/version.txt`
|
||||
else
|
||||
current_version=`curl https://beta.rclone.org/version.txt`
|
||||
fi
|
||||
|
||||
if [ "$version" = "$current_version" ]; then
|
||||
echo && echo "The latest ${install_beta}version of rclone is already installed" && echo
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
||||
#detect the platform
|
||||
OS="`uname`"
|
||||
case $OS in
|
||||
|
Loading…
Reference in New Issue
Block a user