#!/bin/bash

VER='current'

mkdir "${VER}"
cd "${VER}" && \
rm -f rclone-current* && \
aria2c -x 16 "https://downloads.rclone.org/rclone-current-windows-amd64.zip" && \
aria2c -x 16 "https://downloads.rclone.org/rclone-current-osx-amd64.zip" && \
aria2c -x 16 "https://downloads.rclone.org/rclone-current-linux-amd64.zip" && \
aria2c -x 16 "https://downloads.rclone.org/rclone-current-linux-amd64.deb" && \
aria2c -x 16 "https://downloads.rclone.org/rclone-current-linux-amd64.rpm" && \
aria2c -x 16 "https://downloads.rclone.org/rclone-current-freebsd-amd64.zip" && \
aria2c -x 16 "https://downloads.rclone.org/rclone-current-netbsd-amd64.zip" && \
aria2c -x 16 "https://downloads.rclone.org/rclone-current-openbsd-amd64.zip" && \
aria2c -x 16 "https://downloads.rclone.org/rclone-current-plan9-amd64.zip" && \
aria2c -x 16 "https://downloads.rclone.org/rclone-current-solaris-amd64.zip" && \
aria2c -x 16 "https://downloads.rclone.org/rclone-current-windows-386.zip" && \
aria2c -x 16 "https://downloads.rclone.org/rclone-current-linux-386.zip" && \
aria2c -x 16 "https://downloads.rclone.org/rclone-current-linux-386.deb" && \
aria2c -x 16 "https://downloads.rclone.org/rclone-current-linux-386.rpm" && \
aria2c -x 16 "https://downloads.rclone.org/rclone-current-freebsd-386.zip" && \
aria2c -x 16 "https://downloads.rclone.org/rclone-current-netbsd-386.zip" && \
aria2c -x 16 "https://downloads.rclone.org/rclone-current-openbsd-386.zip" && \
aria2c -x 16 "https://downloads.rclone.org/rclone-current-plan9-386.zip" && \
aria2c -x 16 "https://downloads.rclone.org/rclone-current-linux-arm.zip" && \
aria2c -x 16 "https://downloads.rclone.org/rclone-current-linux-arm.deb" && \
aria2c -x 16 "https://downloads.rclone.org/rclone-current-linux-arm.rpm" && \
aria2c -x 16 "https://downloads.rclone.org/rclone-current-freebsd-arm.zip" && \
aria2c -x 16 "https://downloads.rclone.org/rclone-current-netbsd-arm.zip" && \
aria2c -x 16 "https://downloads.rclone.org/rclone-current-linux-arm-v6.zip" && \
aria2c -x 16 "https://downloads.rclone.org/rclone-current-linux-arm-v6.deb" && \
aria2c -x 16 "https://downloads.rclone.org/rclone-current-linux-arm-v6.rpm" && \
aria2c -x 16 "https://downloads.rclone.org/rclone-current-freebsd-arm-v6.zip" && \
aria2c -x 16 "https://downloads.rclone.org/rclone-current-netbsd-arm-v6.zip" && \
aria2c -x 16 "https://downloads.rclone.org/rclone-current-linux-arm-v7.zip" && \
aria2c -x 16 "https://downloads.rclone.org/rclone-current-linux-arm-v7.deb" && \
aria2c -x 16 "https://downloads.rclone.org/rclone-current-linux-arm-v7.rpm" && \
aria2c -x 16 "https://downloads.rclone.org/rclone-current-freebsd-arm-v7.zip" && \
aria2c -x 16 "https://downloads.rclone.org/rclone-current-netbsd-arm-v7.zip" && \
aria2c -x 16 "https://downloads.rclone.org/rclone-current-windows-arm64.zip" && \
aria2c -x 16 "https://downloads.rclone.org/rclone-current-osx-arm64.zip" && \
aria2c -x 16 "https://downloads.rclone.org/rclone-current-linux-arm64.zip" && \
aria2c -x 16 "https://downloads.rclone.org/rclone-current-linux-arm64.deb" && \
aria2c -x 16 "https://downloads.rclone.org/rclone-current-linux-arm64.rpm" && \
aria2c -x 16 "https://downloads.rclone.org/rclone-current-linux-mips.zip" && \
aria2c -x 16 "https://downloads.rclone.org/rclone-current-linux-mips.deb" && \
aria2c -x 16 "https://downloads.rclone.org/rclone-current-linux-mips.rpm" && \
aria2c -x 16 "https://downloads.rclone.org/rclone-current-linux-mipsle.zip" && \
aria2c -x 16 "https://downloads.rclone.org/rclone-current-linux-mipsle.deb" && \
aria2c -x 16 "https://downloads.rclone.org/rclone-current-linux-mipsle.rpm" && \
chown -R www-data:www-data . && \
echo ''  && \
echo ''  && \
echo '========== Finished ========='  && \
echo '' 
