From ac1c24666bceb64a482e316ba648c26e5a36eb6d Mon Sep 17 00:00:00 2001 From: Roy <88516395+moraroy@users.noreply.github.com> Date: Mon, 29 Jul 2024 16:52:08 -0700 Subject: [PATCH] delete log before creating new one so its not so big --- NonSteamLaunchers.sh | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/NonSteamLaunchers.sh b/NonSteamLaunchers.sh index 96de838..bd6dfdc 100755 --- a/NonSteamLaunchers.sh +++ b/NonSteamLaunchers.sh @@ -25,8 +25,17 @@ download_dir="${logged_in_home}/Downloads/NonSteamLaunchersInstallation" -# Create a log file in the same directory as the desktop file/.sh file -exec >> "${logged_in_home}/Downloads/NonSteamLaunchers-install.log" 2>&1 +# Define the log file path +log_file="${logged_in_home}/Downloads/NonSteamLaunchers-install.log" + +# Check if the log file exists and delete it +if [ -f "$log_file" ]; then + rm "$log_file" +fi + +# Create a new log file +exec >> "$log_file" 2>&1 + # Version number (major.minor) version=v3.9.1