This is an experimental copy for testing Poikilos' issue mirroring system. Note that Gitea's migration tool can import issues, but the "Issues" checkbox is disabled when "This repository will be a mirror" is enabled (it is for this repo).
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

58 lines
1.7 KiB

#!/bin/bash
echo
echo
echo
echo "Starting cleanup and library rebuild..."
date
zip_name=linux-minetest-kit.zip
extracted_name=linux-minetest-kit
in_use_name=minetest
#not reliable with bash -e (if not running, check throws error):
#running=`ps ax | grep -v grep | grep $in_use_name | wc -l`
#if [ $running -gt 0 ]; then
# echo "killing minetest processes..."
# killall $in_use_name
#fi
url=https://downloads.minetest.org
customDie () {
6 years ago
echo "ERROR: Cannot continue since"
echo "$1"
exit 1
}
if [ -d "$extracted_name" ]; then
if [ "`ls -lR screenshots/*.png | wc -l`" -gt 0 ]; then
mv screenshots/*.png ~/ || customDie "can't move screenshots from $extracted_name/minetest/bin/*.png"
rmdir --ignore-fail-on-non-empty screenshots
fi
if [ "`ls -lR $extracted_name/minetest/bin/*.png | wc -l`" -gt 0 ]; then
# if [ ! -d screenshots ]; then mkdir screenshots; fi
# NOTE: system-wide install of minetest puts screenshots in ~/ (cwd)
mv $extracted_name/minetest/bin/*.png ~/ || customDie "can't move screenshots from $extracted_name/minetest/bin/*.png"
fi
rm -Rf "$extracted_name" || customDie "can't remove $extracted_name"
fi
wget -O $zip_name $url/$zip_name || customDie "no $zip_name at $url"
unzip -u $zip_name || customDie "Can't unzip $zip_name"
cd "$extracted_name"
echo "compiling libraries..."
date
bash -e mtcompile-libraries.sh build >& libraries.log
date
echo " (see libraries.log in case of any errors)"
#echo "compiling program..."
#bash -e mtcompile-program.sh build >& program.log
echo "done."
echo
6 years ago
echo
echo
echo
echo
cd ..
6 years ago
echo "Check libraries.log for errors, then..."
6 years ago
echo "- Run the following manually for SERVER only (no graphical client):"
echo " bash install-mts.sh"
echo
echo