From 0f549a48d53ee395741aaa20cdeaa35f5f3e6f94 Mon Sep 17 00:00:00 2001 From: wytch Date: Sat, 28 Feb 2026 17:33:14 -0600 Subject: [PATCH] Updated installer once more --- install.sh | 19 +++++++++++----- rclone-install.sh | 57 +++++++++++++++++++++++++---------------------- 2 files changed, 44 insertions(+), 32 deletions(-) diff --git a/install.sh b/install.sh index 1d5b07e..bbaf052 100644 --- a/install.sh +++ b/install.sh @@ -1,7 +1,10 @@ #!/bin/bash ENDPOINT="https://git.sassysalamander.net/wytch/recalbox-savesync/archive/main.tar.gz" -cd ~ || { printf "Could not cd to ~. Exiting\n"; exit 1; } +cd ~ || { + printf "Could not cd to ~. Exiting\n" + exit 1 +} printf "Curling tarball..." curl -L -o savesync.tar.gz "$ENDPOINT" 2>/dev/null printf "done\n" @@ -10,17 +13,20 @@ tar -xvf savesync.tar.gz >/dev/null printf "done\n" rm savesync.tar.gz -cd recalbox-savesync || { printf "Could not cd into extracted directory. Exiting\n"; exit 1; } +cd recalbox-savesync || { + printf "Could not cd into extracted directory. Exiting\n" + exit 1 +} re="'^[yY][eE]?[sS]?$'" result="0" -while [ "$result" -ne 1 ]; do +while [ "$result" -ne 1 ]; do read -rp "\nWhat's your rclone prefix? : " prefix read -rp "Is $prefix okay? [y/N]: " ans result="$(grep -E -c "$re" "$ans")" done -printf "s//%s/g" "$prefix" > "/tmp/savesync.sed" +printf "s//%s/g" "$prefix" >"/tmp/savesync.sed" sed -ie "/tmp/savesync.sed" "*.ash" rm "/tmp/savesync.sed" printf "Installing scripts...n" @@ -29,7 +35,10 @@ mkdir -p /recalbox/share/userscripts/manual cp "locksync.ash" /recalbox/share/userscripts/manual/ printf "done\n" printf "Cleaning up..." -cd .. || { printf "failed\nExiting\n"; exit 1; } +cd .. || { + printf "failed\nExiting\n" + exit 1 +} rm -rf recalbox-savesync printf "done\n" diff --git a/rclone-install.sh b/rclone-install.sh index 490e841..47986f5 100644 --- a/rclone-install.sh +++ b/rclone-install.sh @@ -1,38 +1,43 @@ #!/bin/bash + +### THIS IS NOT MY SCRIPT +### THIS WAS WRITTEN BY Claude Pageau +### All rights over license goes to them + ver="1.6" echo "$0 ver $ver written by Claude Pageau" cd ~ if [ ! -f /usr/bin/rclone -o ! -z "$1" ]; then - echo "-------------------------------------------------------------------------------" - wget -O rclone.zip https://downloads.rclone.org/rclone-current-linux-arm.zip - echo "unzip rclone.zip to folder rclone-tmp" - unzip -o -j -d rclone-tmp rclone.zip - echo "Install files and man pages" - cd rclone-tmp - cp rclone /usr/bin/ - chown root:root /usr/bin/rclone - chmod 755 /usr/bin/rclone - mkdir -p /usr/local/share/man/man1 - cp rclone.1 /usr/local/share/man/man1/ - mandb - cd .. - echo "Deleting rclone.zip and Folder rclone-tmp" - rm rclone.zip - rm -r rclone-tmp + echo "-------------------------------------------------------------------------------" + wget -O rclone.zip https://downloads.rclone.org/rclone-current-linux-arm.zip + echo "unzip rclone.zip to folder rclone-tmp" + unzip -o -j -d rclone-tmp rclone.zip + echo "Install files and man pages" + cd rclone-tmp + cp rclone /usr/bin/ + chown root:root /usr/bin/rclone + chmod 755 /usr/bin/rclone + mkdir -p /usr/local/share/man/man1 + cp rclone.1 /usr/local/share/man/man1/ + mandb + cd .. + echo "Deleting rclone.zip and Folder rclone-tmp" + rm rclone.zip + rm -r rclone-tmp fi if [ -f /usr/bin/rclone ]; then - echo "rclone is installed at /usr/bin/rclone" - rclone -V - mkdir -p rpi-sync - cd rpi-sync - wget -O rclone-sync.sh https://raw.github.com/pageauc/rclone4pi/master/rclone-sync.sh - wget -O Readme.md https://raw.github.com/pageauc/rclone4pi/master/Readme.md - wget -O rclone-install.sh https://raw.github.com/pageauc/rclone4pi/master/rclone-install.sh - chmod +x *sh + echo "rclone is installed at /usr/bin/rclone" + rclone -V + mkdir -p rpi-sync + cd rpi-sync + wget -O rclone-sync.sh https://raw.github.com/pageauc/rclone4pi/master/rclone-sync.sh + wget -O Readme.md https://raw.github.com/pageauc/rclone4pi/master/Readme.md + wget -O rclone-install.sh https://raw.github.com/pageauc/rclone4pi/master/rclone-install.sh + chmod +x *sh else - echo "ERROR - Problem Installing rclone. Please Investigate" + echo "ERROR - Problem Installing rclone. Please Investigate" fi echo "rclone installed at /usr/bin/rclone" @@ -71,5 +76,3 @@ To upgrade For more Details See https://github.com/pageauc/rclone4pi/wiki/Home Bye " - -