Bash script to install a much more recent version of rsync from source on macOs.
Requires as a minimum Xcode CLI tools (no need for a full install). Can be installed via the following:
$ xcode-select --install| #!/bin/bash -e | |
| VERSION="3.5.0" | |
| WORK_DIR=$(mktemp -d) | |
| sudo --validate | |
| curl --fail --silent "https://rsync.samba.org/ftp/rsync/src/rsync-$VERSION.tar.gz" | | |
| tar --directory "$WORK_DIR" --extract --gzip | |
| curl --fail --silent "https://rsync.samba.org/ftp/rsync/src/rsync-patches-$VERSION.tar.gz" | | |
| tar --directory "$WORK_DIR" --extract --gzip | |
| pushd "$WORK_DIR/rsync-$VERSION" | |
| ./configure \ | |
| --disable-lz4 \ | |
| --disable-openssl \ | |
| --disable-xxhash \ | |
| --disable-zstd | |
| make | |
| sudo cp ./rsync /usr/local/bin | |
| popd | |
| rsync --version | |
| # cleanup | |
| rm -fr "$WORK_DIR" |