Skip to content

Instantly share code, notes, and snippets.

@d0zingcat
Last active December 18, 2020 10:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save d0zingcat/b7eb99638ba4a471db590f2489105e42 to your computer and use it in GitHub Desktop.
Save d0zingcat/b7eb99638ba4a471db590f2489105e42 to your computer and use it in GitHub Desktop.
download rclone and replace binary program with latest rclone
#!/usr/bin/env bash
set -x
rclone_zip=rclone.zip
curl -L https://downloads.rclone.org/rclone-current-linux-amd64.zip -o $rclone_zip
unzip -o $rclone_zip
dir_name=`ls -F | grep -e 'rclone.*/'`
version=`echo $dir_name | cut -d"-" -f2`
echo $dir_name, $version
name_with_version="rclone_$version"
cp "$dir_name"/rclone /usr/local/bin/$name_with_version
rm /usr/bin/rclone
ln -s /usr/local/bin/$name_with_version /usr/bin/rclone
chmod u+x /usr/bin/rclone
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment