Add script for installing godot
This commit is contained in:
parent
c327844143
commit
9aea865f77
2 changed files with 37 additions and 0 deletions
|
@ -44,6 +44,7 @@ source "$softwareRoot/code.sh"
|
||||||
source "$softwareRoot/nodejs.sh"
|
source "$softwareRoot/nodejs.sh"
|
||||||
source "$softwareRoot/java.sh"
|
source "$softwareRoot/java.sh"
|
||||||
source "$softwareRoot/tea.sh"
|
source "$softwareRoot/tea.sh"
|
||||||
|
source "$softwareRoot/godot.sh"
|
||||||
|
|
||||||
# Install other flatpaks
|
# Install other flatpaks
|
||||||
flatpak install -y flathub com.bitwarden.desktop
|
flatpak install -y flathub com.bitwarden.desktop
|
||||||
|
|
36
scripts/PopOS/software/godot.sh
Executable file
36
scripts/PopOS/software/godot.sh
Executable file
|
@ -0,0 +1,36 @@
|
||||||
|
#!/bin/bash
|
||||||
|
# Elevate script
|
||||||
|
if [ ! "$UID" -eq 0 ]
|
||||||
|
then
|
||||||
|
sudo bash "$BASH_SOURCE" "$USER"
|
||||||
|
else
|
||||||
|
tempDir="$(mktemp -d)"
|
||||||
|
archiveName="$(mktemp)"
|
||||||
|
destination="/var/lib/godot"
|
||||||
|
|
||||||
|
if [ -d "$destination" ]; then
|
||||||
|
rm -rf "$destination"
|
||||||
|
fi
|
||||||
|
|
||||||
|
wget https://github.com/godotengine/godot/releases/download/3.5.1-stable/Godot_v3.5.1-stable_mono_x11_64.zip -O "$archiveName"
|
||||||
|
unzip "$archiveName" -d "$tempDir"
|
||||||
|
mkdir -p "$destination"
|
||||||
|
mv "$tempDir"/*/* "$destination"
|
||||||
|
wget https://github.com/godotengine/godot/raw/3.5.1-stable/icon.svg -O "$destination/icon.svg"
|
||||||
|
|
||||||
|
rm -rf "$tempDir"
|
||||||
|
rm -f "$archiveName"
|
||||||
|
|
||||||
|
exeFile="$(find "$destination" -maxdepth 1 -perm -111 -type f)"
|
||||||
|
ln -s "$exeFile" /usr/local/bin/godot
|
||||||
|
|
||||||
|
{
|
||||||
|
echo "[Desktop Entry]"
|
||||||
|
echo "Encoding=UTF-8"
|
||||||
|
echo "Type=Application"
|
||||||
|
echo "Terminal=false"
|
||||||
|
echo "Exec=$exeFile"
|
||||||
|
echo "Name=Godot Engine"
|
||||||
|
echo "Icon=$destination/icon.svg"
|
||||||
|
} > /usr/share/applications/godot.desktop
|
||||||
|
fi
|
Loading…
Reference in a new issue