Update rclone to latest version with rclone -U

Disclaimer 1: Unix systems only- I know nearly nothing about Windows, but maybe something similar can be done. I have no idea. Tested only on Linux, but should work for Macintosh OS by Apple Computers, I presume.

Disclaimer 2: As far as I can tell, this does not disrupt the native -U flag that comes with rclone, when being used with regular commands. (Since this is used only by itself)

Copy this to ~/.bashrc

rclone() { if [[ $@ == "-U" ]]; then command curl https://rclone.org/install.sh | sudo bash; else command rclone "$@"; fi; }

Save, then source ~/.bashrc

Now running rclone -U will automatically update rclone to the latest version. Helpful for keeping updated. Could even add rclone -U to a cron job of some sort.

1 Like

Thanks, now we can update rclone very easy. :wink:

There is an issue about doing this so it would work with all OSes here:

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.