install: Pre verify sudo authorization "-v" before calling curl.

The way this was, the curl interferes with the bash invocation. Here it will authenticate first.
This commit is contained in:
Michael C Tiernan - MIT-Research Computing Project 2022-05-12 15:19:33 -04:00 committed by GitHub
parent 6f91198b57
commit 0ba702ccf4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View File

@ -26,11 +26,11 @@ using the [rclone selfupdate](/commands/rclone_selfupdate/) command.
To install rclone on Linux/macOS/BSD systems, run: To install rclone on Linux/macOS/BSD systems, run:
curl https://rclone.org/install.sh | sudo bash sudo -v ; curl https://rclone.org/install.sh | sudo bash
For beta installation, run: For beta installation, run:
curl https://rclone.org/install.sh | sudo bash -s beta sudo -v ; curl https://rclone.org/install.sh | sudo bash -s beta
Note that this script checks the version of rclone installed first and Note that this script checks the version of rclone installed first and
won't re-download if not needed. won't re-download if not needed.

View File

@ -12,7 +12,7 @@ set -e
#when adding a tool to the list make sure to also add its corresponding command further in the script #when adding a tool to the list make sure to also add its corresponding command further in the script
unzip_tools_list=('unzip' '7z' 'busybox') unzip_tools_list=('unzip' '7z' 'busybox')
usage() { echo "Usage: curl https://rclone.org/install.sh | sudo bash [-s beta]" 1>&2; exit 1; } usage() { echo "Usage: sudo -v ; curl https://rclone.org/install.sh | sudo bash [-s beta]" 1>&2; exit 1; }
#check for beta flag #check for beta flag
if [ -n "$1" ] && [ "$1" != "beta" ]; then if [ -n "$1" ] && [ "$1" != "beta" ]; then