diff --git a/src/Artemis.UI.Linux/ApplicationStateManager.cs b/src/Artemis.UI.Linux/ApplicationStateManager.cs index 2a57426a3..dd4ae179a 100644 --- a/src/Artemis.UI.Linux/ApplicationStateManager.cs +++ b/src/Artemis.UI.Linux/ApplicationStateManager.cs @@ -150,7 +150,7 @@ public class ApplicationStateManager string script = Path.Combine(Constants.UpdatingFolder, "installing", "Scripts", "update.sh"); string source = $"\"{Path.Combine(Constants.UpdatingFolder, "installing")}\""; string destination = $"\"{Constants.ApplicationFolder}\""; - string args = argsList.Any() ? $"\"'{string.Join(' ', argsList)}'\"" : ""; + string args = argsList.Any() ? $"\"{string.Join(' ', argsList)}\"" : ""; RunScriptWithOutputFile(script, $"{source} {destination} {args}", Path.Combine(Constants.DataFolder, "update-log.txt")); diff --git a/src/Artemis.UI.Linux/Scripts/update.sh b/src/Artemis.UI.Linux/Scripts/update.sh index 315a1816e..f8b47c72c 100644 --- a/src/Artemis.UI.Linux/Scripts/update.sh +++ b/src/Artemis.UI.Linux/Scripts/update.sh @@ -1,11 +1,5 @@ #!/bin/bash -# This script is used to update Artemis on Linux. -# Arguments: -# $1 = sourceDirectory, the directory where the new files are located -# $2 = destinationDirectory, the directory where the old files are located -# $3 = artemisArgs, the arguments to pass to the Artemis executable - sourceDirectory=$1 destinationDirectory=$2 artemisArgs=$3 @@ -46,6 +40,9 @@ mv "$sourceDirectory"/* "$destinationDirectory" # Remove the now empty source directory rmdir "$sourceDirectory" +# Ensure the executable is executable +chmod +x "$destinationDirectory/Artemis.UI.Linux" + echo "Finished! Restarting Artemis" sleep 1