62 lines
1.7 KiB
Bash
Executable file
62 lines
1.7 KiB
Bash
Executable file
#!/bin/bash
|
|
|
|
software_PATH=/home/$(whoami)/Software
|
|
|
|
if [[ ! -d $software_PATH ]]; then
|
|
mkdir $software_PATH
|
|
fi
|
|
|
|
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
|
|
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
|
|
make
|
|
|
|
echo -ne "[Desktop Entry]
|
|
Name[en_US]=Unreal Engine $answer
|
|
Name=Unreal Engine $answer
|
|
GenericName[en_US]=Game Engine
|
|
GenericName=Game Engine
|
|
Comment[en_US]=Unreal Engine Editor
|
|
Comment=Unreal Engine Editor
|
|
Exec=$software_PATH/UnrealEngine$answer/Engine/Binaries/Linux/UnrealEditor
|
|
Icon=$software_PATH/UnrealEngine$answer/Engine/Content/Editor/Slate/About/UnrealLogo.svg
|
|
StartupNotify=true
|
|
Terminal=false
|
|
Type=Application
|
|
Categories=Development;Animation;
|
|
" >> "UnrealEngine$answer.desktop"
|
|
|
|
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
|
|
break
|
|
elif [[ "${response,,}" = "y" ]]; then
|
|
break
|
|
else
|
|
"Invalid Response (y/n)"
|
|
fi
|
|
done
|
|
|
|
if [[ "${response,,}" == "y" ]]; then
|
|
echo -n ""
|
|
else
|
|
break
|
|
fi
|
|
|
|
done
|