mirror of
https://github.com/moraroy/NonSteamLaunchers-On-Steam-Deck.git
synced 2024-11-20 08:09:18 +01:00
better ludusavi
This commit is contained in:
parent
c4287a53b6
commit
f2f8d63298
@ -1146,7 +1146,7 @@ export STEAM_COMPAT_DATA_PATH="${logged_in_home}/.local/share/Steam/steamapps/co
|
|||||||
|
|
||||||
if [[ $options == *"NSLGameSaves"* ]]; then
|
if [[ $options == *"NSLGameSaves"* ]]; then
|
||||||
echo "Running restore..."
|
echo "Running restore..."
|
||||||
nohup flatpak run com.github.mtkennerly.ludusavi restore --force > /dev/null 2>&1 &
|
nohup flatpak run com.github.mtkennerly.ludusavi --config "${logged_in_home}/.var/app/com.github.mtkennerly.ludusavi/config/ludusavi/NSLconfig/" restore --force > /dev/null 2>&1 &
|
||||||
wait $!
|
wait $!
|
||||||
echo "Restore completed"
|
echo "Restore completed"
|
||||||
zenity --info --text="Restore was successful" --timeout=5
|
zenity --info --text="Restore was successful" --timeout=5
|
||||||
@ -1652,26 +1652,40 @@ fi
|
|||||||
|
|
||||||
rclone_zip_url="https://downloads.rclone.org/rclone-current-linux-amd64.zip"
|
rclone_zip_url="https://downloads.rclone.org/rclone-current-linux-amd64.zip"
|
||||||
rclone_zip_file="${logged_in_home}/Downloads/NonSteamLaunchersInstallation/rclone-current-linux-amd64.zip"
|
rclone_zip_file="${logged_in_home}/Downloads/NonSteamLaunchersInstallation/rclone-current-linux-amd64.zip"
|
||||||
rclone_extract_dir="${logged_in_home}/Downloads/NonSteamLaunchersInstallation/rclone-v1.67.0-linux-amd64"
|
rclone_base_dir="${logged_in_home}/Downloads/NonSteamLaunchersInstallation"
|
||||||
rclone_bin="${rclone_extract_dir}/rclone"
|
|
||||||
|
|
||||||
# Download and extract rclone
|
# Download and extract rclone
|
||||||
if [ -d "${logged_in_home}/Downloads/NonSteamLaunchersInstallation" ]; then
|
if [ -d "$rclone_base_dir" ]; then
|
||||||
echo "Downloading rclone..."
|
echo "Downloading rclone..."
|
||||||
wget -O "$rclone_zip_file" "$rclone_zip_url"
|
wget -O "$rclone_zip_file" "$rclone_zip_url"
|
||||||
echo "Extracting rclone..."
|
echo "Extracting rclone..."
|
||||||
unzip -o "$rclone_zip_file" -d "${logged_in_home}/Downloads/NonSteamLaunchersInstallation"
|
unzip -o "$rclone_zip_file" -d "$rclone_base_dir"
|
||||||
echo "rclone downloaded and extracted"
|
echo "rclone downloaded and extracted"
|
||||||
else
|
else
|
||||||
echo "Download directory does not exist. Exiting script."
|
echo "Download directory does not exist. Exiting script."
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Find the extracted rclone directory dynamically
|
||||||
|
rclone_extract_dir=$(find "$rclone_base_dir" -maxdepth 1 -type d -name "rclone-v*-linux-amd64" | head -n 1)
|
||||||
|
rclone_bin="${rclone_extract_dir}/rclone"
|
||||||
|
|
||||||
|
# Move rclone to the NSLconfig directory
|
||||||
|
if [ -f "$rclone_bin" ]; then
|
||||||
|
mv "$rclone_bin" "$nsl_config_dir"
|
||||||
|
rclone_path="${nsl_config_dir}/rclone"
|
||||||
|
echo "rclone moved to $nsl_config_dir"
|
||||||
|
else
|
||||||
|
echo "rclone binary not found. Exiting script."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
# Setting up Backup Saves through Ludusavi
|
# Setting up Backup Saves through Ludusavi
|
||||||
|
|
||||||
# Define the directory and file path
|
# Define the directory and file path
|
||||||
config_dir="${logged_in_home}/.var/app/com.github.mtkennerly.ludusavi/config/ludusavi"
|
config_dir="${logged_in_home}/.var/app/com.github.mtkennerly.ludusavi/config/ludusavi"
|
||||||
config_file="$config_dir/config.yaml"
|
nsl_config_dir="$config_dir/NSLconfig"
|
||||||
backup_dir="$config_dir/config_backups"
|
backup_dir="$config_dir/config_backups"
|
||||||
timestamp=$(date +%m-%d-%Y_%H:%M:%S)
|
timestamp=$(date +%m-%d-%Y_%H:%M:%S)
|
||||||
backup_config_file="$backup_dir/config.yaml.bak_$timestamp"
|
backup_config_file="$backup_dir/config.yaml.bak_$timestamp"
|
||||||
@ -1680,20 +1694,20 @@ backup_config_file="$backup_dir/config.yaml.bak_$timestamp"
|
|||||||
mkdir -p "$backup_dir"
|
mkdir -p "$backup_dir"
|
||||||
|
|
||||||
# Backup existing config.yaml if it exists
|
# Backup existing config.yaml if it exists
|
||||||
if [ -f "$config_file" ]; then
|
if [ -f "$config_dir/config.yaml" ]; then
|
||||||
cp "$config_file" "$backup_config_file"
|
cp "$config_dir/config.yaml" "$backup_config_file"
|
||||||
echo "Existing config.yaml backed up to $backup_config_file"
|
echo "Existing config.yaml backed up to $backup_config_file"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Create the directory if it doesn't exist
|
# Create the NSLconfig directory if it doesn't exist
|
||||||
mkdir -p "$config_dir"
|
mkdir -p "$nsl_config_dir"
|
||||||
|
|
||||||
# Move rclone to the config directory
|
# Move rclone to the NSLconfig directory
|
||||||
mv "$rclone_bin" "$config_dir"
|
mv "$rclone_bin" "$nsl_config_dir"
|
||||||
rclone_path="${config_dir}/rclone"
|
rclone_path="${nsl_config_dir}/rclone"
|
||||||
|
|
||||||
# Write the configuration to the file
|
# Write the configuration to the NSLconfig file
|
||||||
cat <<EOL > "$config_file"
|
cat <<EOL > "$nsl_config_dir/config.yaml"
|
||||||
---
|
---
|
||||||
runtime:
|
runtime:
|
||||||
threads: ~
|
threads: ~
|
||||||
@ -1795,21 +1809,14 @@ apps:
|
|||||||
customGames: []
|
customGames: []
|
||||||
EOL
|
EOL
|
||||||
|
|
||||||
echo "Configuration file created at $config_file"
|
|
||||||
# Update the manifest
|
|
||||||
echo "Updating manifest..."
|
|
||||||
flatpak run com.github.mtkennerly.ludusavi manifest update
|
|
||||||
echo "Manifest update completed"
|
|
||||||
|
|
||||||
# Run Once
|
# Run Once
|
||||||
echo "Running backup..."
|
echo "Running backup..."
|
||||||
nohup flatpak run com.github.mtkennerly.ludusavi backup --force > /dev/null 2>&1 &
|
nohup flatpak run com.github.mtkennerly.ludusavi --config "$nsl_config_dir" backup --force > /dev/null 2>&1 &
|
||||||
wait $!
|
wait $!
|
||||||
echo "Backup completed"
|
echo "Backup completed"
|
||||||
# End of Ludusavi configuration
|
# End of Ludusavi configuration
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
echo "100"
|
echo "100"
|
||||||
echo "# Installation Complete - Steam will now restart. Your launchers will be in your library!...Food for thought...do Jedis use Force Compatability?"
|
echo "# Installation Complete - Steam will now restart. Your launchers will be in your library!...Food for thought...do Jedis use Force Compatability?"
|
||||||
) |
|
) |
|
||||||
|
Loading…
Reference in New Issue
Block a user