From fda13ef8dae94c9c5bb8d3ee9ff00a0f842d9323 Mon Sep 17 00:00:00 2001 From: Roy <88516395+moraroy@users.noreply.github.com> Date: Sat, 20 Jan 2024 17:57:18 -0800 Subject: [PATCH] Rough way to update the .py before the script is run --- NonSteamLaunchers.sh | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/NonSteamLaunchers.sh b/NonSteamLaunchers.sh index 92298a9..3d8c225 100755 --- a/NonSteamLaunchers.sh +++ b/NonSteamLaunchers.sh @@ -42,6 +42,27 @@ check_for_updates() { fi } +#Rough way to "update" the .py for users that already had the service file" +rm -rf ${logged_in_home}/.config/systemd/user/NSLGameScanner.py + +# Delete the service file +rm -rf ${logged_in_home}/.config/systemd/user/nslgamescanner.service + +# Remove the symlink +unlink /home/deck/.config/systemd/user/default.target.wants/nslgamescanner.service + +# Reload the systemd user instance +systemctl --user daemon-reload + +# Define your Python script path +python_script_path="${logged_in_home}/.config/systemd/user/NSLGameScanner.py" + +# Define your GitHub link +github_link="https://raw.githubusercontent.com/moraroy/NonSteamLaunchers-On-Steam-Deck/main/NSLGameScanner.py" +curl -o $python_script_path $github_link +#End of Updating the .py for users before script is run + + # Get the command line arguments args=("$@") @@ -3139,5 +3160,5 @@ curl -o $python_script_path $github_link echo "Starting the service..." # Call your Python script -python3 $python_script_path & +python3 $python_script_path