commit cf574f59eb7d87a0ec577177150b4172e023a87b Author: marco Date: Mon May 11 11:29:51 2026 +0200 initial diff --git a/ersc-script.sh b/ersc-script.sh new file mode 100755 index 0000000..85dbe36 --- /dev/null +++ b/ersc-script.sh @@ -0,0 +1,51 @@ +#!/bin/bash + +#gets latest download url from github +sc_download_url=$(curl -s "https://api.github.com/repos/LukeYui/EldenRingSeamlessCoopRelease/releases/latest" | jq -r '.assets[0].browser_download_url') + +#find elden ring install path +eldenring_dir=$(find / -path '*/Game/*' -iname eldenring.exe -printf '%h\n' -quit 2>/dev/null) + +read -p "Is this your Elden Ring Game folder? $eldenring_dir [Y/n]: " input +if [[ $input == "n" || $input == "N" || $input == "No" || $input == "no" ]]; then + input="" + read -p "Please provide your Elden Ring Directory Path: " input + if test -f "$input/eldenring.exe"; then + echo "Correct Elden Ring directory" + eldenring_dir=$input + echo $eldenring_dir + else + echo "Incorrect Elden Ring directory. 'eldenring.exe' not found at provided path. Exiting..." + exit 1 + fi +fi + +input="" + +echo "Creating temp download folder" +mkdir -p ./ersc-download +cd ./ersc-download + +echo "Downloading Seamless Coop" +echo "Download Url: $sc_download_url" +wget -q $sc_download_url + +echo "Unzipping downloaded files" +unzip -q Seamless* +rm Seamless*.zip + +# If seamless coop settings exist in install directory, ask the user whether they want to replace the settings file +# If 'no', will delete the empty settings file, so it doesn't get overwritten when copying the files +if test -f "$eldenring_dir/ersc_launcher.exe"; then + read -p "Override existing Seamless Coop settings? This resets all of your Seamless Coop settings, including multiplayer password [Y/n]: " input + if [[ $input == "n" || $input == "N" || $input == "No" || $input == "no" ]]; then + rm SeamlessCoop/ersc_settings.ini + fi +fi + +echo "Moving source files to Elden Ring Directory" +rsync -r --remove-source-files * "$eldenring_dir" + +echo "Deleting temp download folder" +cd ../ +rm -r ./ersc-download