Updated installer once more

This commit is contained in:
2026-02-28 17:33:14 -06:00
parent 88f6d0b05d
commit 0f549a48d5
2 changed files with 44 additions and 32 deletions

View File

@@ -1,7 +1,10 @@
#!/bin/bash #!/bin/bash
ENDPOINT="https://git.sassysalamander.net/wytch/recalbox-savesync/archive/main.tar.gz" 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..." printf "Curling tarball..."
curl -L -o savesync.tar.gz "$ENDPOINT" 2>/dev/null curl -L -o savesync.tar.gz "$ENDPOINT" 2>/dev/null
printf "done\n" printf "done\n"
@@ -10,17 +13,20 @@ tar -xvf savesync.tar.gz >/dev/null
printf "done\n" printf "done\n"
rm savesync.tar.gz 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]?$'" re="'^[yY][eE]?[sS]?$'"
result="0" result="0"
while [ "$result" -ne 1 ]; do while [ "$result" -ne 1 ]; do
read -rp "\nWhat's your rclone prefix? : " prefix read -rp "\nWhat's your rclone prefix? : " prefix
read -rp "Is $prefix okay? [y/N]: " ans read -rp "Is $prefix okay? [y/N]: " ans
result="$(grep -E -c "$re" "$ans")" result="$(grep -E -c "$re" "$ans")"
done done
printf "s/<RCLONE_PREFIX>/%s/g" "$prefix" > "/tmp/savesync.sed" printf "s/<RCLONE_PREFIX>/%s/g" "$prefix" >"/tmp/savesync.sed"
sed -ie "/tmp/savesync.sed" "*.ash" sed -ie "/tmp/savesync.sed" "*.ash"
rm "/tmp/savesync.sed" rm "/tmp/savesync.sed"
printf "Installing scripts...n" printf "Installing scripts...n"
@@ -29,7 +35,10 @@ mkdir -p /recalbox/share/userscripts/manual
cp "locksync.ash" /recalbox/share/userscripts/manual/ cp "locksync.ash" /recalbox/share/userscripts/manual/
printf "done\n" printf "done\n"
printf "Cleaning up..." printf "Cleaning up..."
cd .. || { printf "failed\nExiting\n"; exit 1; } cd .. || {
printf "failed\nExiting\n"
exit 1
}
rm -rf recalbox-savesync rm -rf recalbox-savesync
printf "done\n" printf "done\n"

View File

@@ -1,38 +1,43 @@
#!/bin/bash #!/bin/bash
### THIS IS NOT MY SCRIPT
### THIS WAS WRITTEN BY Claude Pageau
### All rights over license goes to them
ver="1.6" ver="1.6"
echo "$0 ver $ver written by Claude Pageau" echo "$0 ver $ver written by Claude Pageau"
cd ~ cd ~
if [ ! -f /usr/bin/rclone -o ! -z "$1" ]; then if [ ! -f /usr/bin/rclone -o ! -z "$1" ]; then
echo "-------------------------------------------------------------------------------" echo "-------------------------------------------------------------------------------"
wget -O rclone.zip https://downloads.rclone.org/rclone-current-linux-arm.zip wget -O rclone.zip https://downloads.rclone.org/rclone-current-linux-arm.zip
echo "unzip rclone.zip to folder rclone-tmp" echo "unzip rclone.zip to folder rclone-tmp"
unzip -o -j -d rclone-tmp rclone.zip unzip -o -j -d rclone-tmp rclone.zip
echo "Install files and man pages" echo "Install files and man pages"
cd rclone-tmp cd rclone-tmp
cp rclone /usr/bin/ cp rclone /usr/bin/
chown root:root /usr/bin/rclone chown root:root /usr/bin/rclone
chmod 755 /usr/bin/rclone chmod 755 /usr/bin/rclone
mkdir -p /usr/local/share/man/man1 mkdir -p /usr/local/share/man/man1
cp rclone.1 /usr/local/share/man/man1/ cp rclone.1 /usr/local/share/man/man1/
mandb mandb
cd .. cd ..
echo "Deleting rclone.zip and Folder rclone-tmp" echo "Deleting rclone.zip and Folder rclone-tmp"
rm rclone.zip rm rclone.zip
rm -r rclone-tmp rm -r rclone-tmp
fi fi
if [ -f /usr/bin/rclone ]; then if [ -f /usr/bin/rclone ]; then
echo "rclone is installed at /usr/bin/rclone" echo "rclone is installed at /usr/bin/rclone"
rclone -V rclone -V
mkdir -p rpi-sync mkdir -p rpi-sync
cd rpi-sync cd rpi-sync
wget -O rclone-sync.sh https://raw.github.com/pageauc/rclone4pi/master/rclone-sync.sh 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 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 wget -O rclone-install.sh https://raw.github.com/pageauc/rclone4pi/master/rclone-install.sh
chmod +x *sh chmod +x *sh
else else
echo "ERROR - Problem Installing rclone. Please Investigate" echo "ERROR - Problem Installing rclone. Please Investigate"
fi fi
echo "rclone installed at /usr/bin/rclone" echo "rclone installed at /usr/bin/rclone"
@@ -71,5 +76,3 @@ To upgrade
For more Details See https://github.com/pageauc/rclone4pi/wiki/Home For more Details See https://github.com/pageauc/rclone4pi/wiki/Home
Bye Bye
" "