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.

56 lines
1.5 KiB
Bash

10 months ago
#!/bin/bash
# Fanta <fanta@56k.es>
# Script para compilar love2d última versión en Debian
10 months ago
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