From cc96645899564af175c958b1b9465af1d296b902 Mon Sep 17 00:00:00 2001 From: Rodolfo Barcelli Jo Date: Thu, 11 Jul 2024 13:10:03 +0800 Subject: [PATCH] Update unreal script to only pull the repo if it doesn't exist on the system --- scripts/unrealenginesetup.sh | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/scripts/unrealenginesetup.sh b/scripts/unrealenginesetup.sh index 191e2a4..aa5b1a9 100755 --- a/scripts/unrealenginesetup.sh +++ b/scripts/unrealenginesetup.sh @@ -11,8 +11,10 @@ read -p "Enter your github token: " token while true; do read -p "What release of Unreal Would you like? (Please check the Unreal repository for release numbers): " answer cd $software_PATH - git clone https://github.com/EpicGames/UnrealEngine "UnrealEngine$answer" - cd "UnrealEngine$answer" + if [[ ! -d $software_PATH/UnrealEngine ]]; then + git clone https://github.com/EpicGames/UnrealEngine "UnrealEngine$answer" + fi + cd "$software_PATH/UnrealEngine$answer" git checkout "$answer-release" bash Setup.sh bash GenerateProjectFiles.sh @@ -36,7 +38,9 @@ Categories=Development;Animation; if [[ ! -d /home/$(whoami)/.local/share/applications ]]; then mkdir /home/$(whoami)/.local/share/applications fi + ln -s "$software_PATH/UnrealEngine$answer/UnrealEngine$answer.desktop" ".local/share/applications/" + while true; do read -p "Do you want to install another version? (y/n) " response if [[ "${response,,}" == "n" ]]; then @@ -47,9 +51,11 @@ Categories=Development;Animation; "Invalid Response (y/n)" fi done + if [[ "${response,,}" == "y" ]]; then echo -n "" else break fi + done