Skip to content

"rsync for cloud storage" - Google Drive, S3, Dropbox, Backblaze B2, One Drive, Swift, Hubic, Wasabi, Google Cloud Storage, Azure Blob, Azure Files, Yandex Files

version check in curl installation

Filip Bartodziejab03f6e47596
diff --git a/docs/content/install.sh b/docs/content/install.sh
index f1e3cf9f2..8b0e02ac1 100755
--- a/docs/content/install.sh
+++ b/docs/content/install.sh
@@ -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