1
0
mirror of https://github.com/Artemis-RGB/Artemis synced 2025-12-12 21:38:38 +00:00

Linux - Ensure the executable can execute

This commit is contained in:
Diogo Trindade 2023-03-26 23:12:43 +01:00
parent 40eb66497f
commit 0f61ad8c7b
2 changed files with 4 additions and 7 deletions

View File

@ -150,7 +150,7 @@ public class ApplicationStateManager
string script = Path.Combine(Constants.UpdatingFolder, "installing", "Scripts", "update.sh"); string script = Path.Combine(Constants.UpdatingFolder, "installing", "Scripts", "update.sh");
string source = $"\"{Path.Combine(Constants.UpdatingFolder, "installing")}\""; string source = $"\"{Path.Combine(Constants.UpdatingFolder, "installing")}\"";
string destination = $"\"{Constants.ApplicationFolder}\""; 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")); RunScriptWithOutputFile(script, $"{source} {destination} {args}", Path.Combine(Constants.DataFolder, "update-log.txt"));

View File

@ -1,11 +1,5 @@
#!/bin/bash #!/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 sourceDirectory=$1
destinationDirectory=$2 destinationDirectory=$2
artemisArgs=$3 artemisArgs=$3
@ -46,6 +40,9 @@ mv "$sourceDirectory"/* "$destinationDirectory"
# Remove the now empty source directory # Remove the now empty source directory
rmdir "$sourceDirectory" rmdir "$sourceDirectory"
# Ensure the executable is executable
chmod +x "$destinationDirectory/Artemis.UI.Linux"
echo "Finished! Restarting Artemis" echo "Finished! Restarting Artemis"
sleep 1 sleep 1