Check before execute
This commit is contained in:
parent
abe94ec4cc
commit
d4b2df9a4f
@ -1,8 +1,19 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
RCLONE_PATH="./.rclone-files/"
|
RCLONE_PATH="./.rclone-files/"
|
||||||
|
|
||||||
ARCH=$(uname -m)
|
ARCH=$(uname -m)
|
||||||
|
RCLONE_URL=""
|
||||||
|
FUSERMOUNT_URL=""
|
||||||
|
if [ "$ARCH" == "armv7l" ];then
|
||||||
|
RCLONE_URL="https://beta.rclone.org/test/testbuilds-latest/rclone-android-16-armv7a.gz"
|
||||||
|
FUSERMOUNT_URL="https://github.com/Magisk-Modules-Repo/com.piyushgarg.rclone/raw/master/binary/fusermount-arm"
|
||||||
|
elif [ "$ARCH" == "aarch64" ];then
|
||||||
|
RCLONE_URL="https://beta.rclone.org/test/testbuilds-latest/rclone-android-21-armv8a.gz"
|
||||||
|
FUSERMOUNT_URL="https://github.com/Magisk-Modules-Repo/com.piyushgarg.rclone/raw/master/binary/fusermount-arm64"
|
||||||
|
else
|
||||||
|
echo "Unsupported architecture: $ARCH"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
echo "!!! YOU NEED ROOT TO RUN THIS SCRIPT !!!"
|
echo "!!! YOU NEED ROOT TO RUN THIS SCRIPT !!!"
|
||||||
echo "Installing dependencies..."
|
echo "Installing dependencies..."
|
||||||
@ -11,18 +22,7 @@ echo "Setting up Termux shared storage..."
|
|||||||
termux-setup-storage
|
termux-setup-storage
|
||||||
echo "Downloading rclone..."
|
echo "Downloading rclone..."
|
||||||
mkdir -p $RCLONE_PATH
|
mkdir -p $RCLONE_PATH
|
||||||
RCLONE_URL=""
|
|
||||||
FUSERMOUNT_URL=""
|
|
||||||
if [ "$ARCH" == "armv7l" ];then
|
|
||||||
$RCLONE_URL="https://beta.rclone.org/test/testbuilds-latest/rclone-android-16-armv7a.gz"
|
|
||||||
$FUSERMOUNT_URL="https://github.com/Magisk-Modules-Repo/com.piyushgarg.rclone/raw/master/binary/fusermount-arm"
|
|
||||||
elif [ "$ARCH" == "aarch64" ];then
|
|
||||||
$RCLONE_URL="https://beta.rclone.org/test/testbuilds-latest/rclone-android-21-armv8a.gz"
|
|
||||||
$FUSERMOUNT_URL="https://github.com/Magisk-Modules-Repo/com.piyushgarg.rclone/raw/master/binary/fusermount-arm64"
|
|
||||||
else
|
|
||||||
echo "Unsupported architecture: $ARCH"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
echo "Downloading rclone..."
|
echo "Downloading rclone..."
|
||||||
wget -O - $RCLONE_URL | gunzip -c > "$RCLONE_PATH/rclone"
|
wget -O - $RCLONE_URL | gunzip -c > "$RCLONE_PATH/rclone"
|
||||||
echo "Downloading fusermount..."
|
echo "Downloading fusermount..."
|
||||||
|
Loading…
Reference in New Issue
Block a user