You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
77 lines
2.1 KiB
Bash
77 lines
2.1 KiB
Bash
#!/bin/bash
|
|
# Fanta <fanta@56k.es>
|
|
# Script para compilar love2d última versión en Debian
|
|
|
|
d="/tmp/love2d"
|
|
|
|
if [ "$(whoami)" != "root" ]; then
|
|
echo "[+] Checking root user"
|
|
echo -e "\e[31m\e[1m[NOT OK]\e[0m Run it with root please" && exit
|
|
fi
|
|
|
|
rm -rf $d ; mkdir -p $d
|
|
cd $d
|
|
|
|
|
|
# Debian 11
|
|
cat /etc/issue | grep "Debian GNU/Linux 11" 1>/dev/null ; if [ "$?" -ne 1 ]; then
|
|
apt install -y git gcc g++ make cmake lua5.4 libgl1-mesa-dev libfreetype6-dev libmodplug-dev libopenal-dev libsdl2-dev libtheora-dev libvorbis-dev libmpg123-dev libluajit-5.1-dev
|
|
repositorio="https://github.com/love2d/love"
|
|
git clone "$repositorio"
|
|
cd love
|
|
lastVersion=$(git tag --list --sort=-taggerdate | tail -1)
|
|
cd ..
|
|
rm -rf love
|
|
git clone $repositorio -b $lastVersion
|
|
cd love
|
|
mkdir -p build
|
|
cd build
|
|
cmake ..
|
|
make -j$(nproc)
|
|
cp -pRv love /usr/local/bin/
|
|
chmod +x /usr/local/bin/love
|
|
love
|
|
fi
|
|
|
|
# Debian 12
|
|
cat /etc/issue | grep "Debian GNU/Linux 12" 1>/dev/null ; if [ "$?" -ne 1 ]; then
|
|
apt install -y git gcc g++ make cmake lua5.4 libgl1-mesa-dev libfreetype6-dev libmodplug-dev libopenal-dev libsdl2-dev libtheora-dev libvorbis-dev libmpg123-dev libluajit-5.1-dev
|
|
|
|
repositorio="https://github.com/love2d/love"
|
|
git clone "$repositorio"
|
|
cd love
|
|
lastVersion=$(git tag --list --sort=-taggerdate | tail -1)
|
|
cd ..
|
|
rm -rf love
|
|
git clone $repositorio -b $lastVersion
|
|
cd love
|
|
mkdir -p build
|
|
cd build
|
|
cmake ..
|
|
make -j$(nproc)
|
|
cp -pRv love /usr/local/bin/
|
|
chmod +x /usr/local/bin/love
|
|
love
|
|
fi
|
|
|
|
# Ubuntu 22.04.4
|
|
cat /etc/issue | grep "Ubuntu 22.04.4 LTS" 1>/dev/null ; if [ "$?" -ne 1 ]; then
|
|
apt install -y git gcc g++ make cmake lua5.4 libgl1-mesa-dev libfreetype6-dev libmodplug-dev libopenal-dev libsdl2-dev libtheora-dev libvorbis-dev libmpg123-dev libluajit-5.1-dev
|
|
|
|
repositorio="https://github.com/love2d/love"
|
|
git clone "$repositorio"
|
|
cd love
|
|
lastVersion=$(git tag --list --sort=-taggerdate | tail -1)
|
|
cd ..
|
|
rm -rf love
|
|
git clone $repositorio -b $lastVersion
|
|
cd love
|
|
mkdir -p build
|
|
cd build
|
|
cmake ..
|
|
make -j$(nproc)
|
|
cp -pRv love /usr/local/bin/
|
|
chmod +x /usr/local/bin/love
|
|
love
|
|
fi
|