mirror of
https://github.com/ViViDboarder/hassio-addon-rclone.git
synced 2024-11-15 01:36:37 +00:00
32 lines
419 B
Bash
Executable File
32 lines
419 B
Bash
Executable File
#! /bin/ash
|
|
set -ex
|
|
|
|
VERSION="$1"
|
|
ARCH="$2"
|
|
|
|
# Transform relevant archs
|
|
case $ARCH in
|
|
armhf)
|
|
ARCH=arm
|
|
;;
|
|
armv7)
|
|
ARCH=arm-v7
|
|
;;
|
|
aarch64)
|
|
ARCH=arm64
|
|
;;
|
|
esac
|
|
|
|
RCLONE_NAME=rclone-${VERSION}-linux-${ARCH}
|
|
|
|
# Download
|
|
curl -o rclone.zip https://downloads.rclone.org/${VERSION}/${RCLONE_NAME}.zip
|
|
|
|
# Install
|
|
unzip rclone.zip
|
|
mv ${RCLONE_NAME}/rclone /usr/local/bin/
|
|
|
|
# Clean up
|
|
rm rclone.zip
|
|
rm -fr ${RCLONE_NAME}
|