From 82bc723df3dff9aa2284f4df1fb5578f2f9b1c12 Mon Sep 17 00:00:00 2001 From: the-sane <3657071+the-sane@users.noreply.github.com> Date: Tue, 29 Oct 2024 20:14:43 -0400 Subject: [PATCH] Back up existing launch script --- lug-helper.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lug-helper.sh b/lug-helper.sh index 77a1ed1..4731009 100755 --- a/lug-helper.sh +++ b/lug-helper.sh @@ -2844,6 +2844,10 @@ install_game_wine() { # Copy game launch script to the wine prefix root directory debug_print continue "Copying game launch script to ${install_dir}..." + if [ -f "$install_dir/$wine_launch_script_name" ]; then + # Back it up if it already exists + cp "$install_dir/$wine_launch_script_name" "$install_dir/$(basename "$wine_launch_script_name" .sh).bak" + fi cp "$wine_launch_script" "$install_dir" installed_launch_script="$install_dir/$wine_launch_script_name"