Browse Source

use preset dir for build-MultiCraft.sh and improve dependency script output

master
poikilos 5 years ago
committed by Jacob Gustafson
parent
commit
ccbe0f3a75
  1. 16
      build-MultiCraft.sh
  2. 3
      install-minetest-build-deps.sh

16
build-MultiCraft.sh

@ -13,14 +13,19 @@ customDie() {
echo
exit 1
}
if [ ! -d "$HOME/Downloads/git/MultiCraft" ]; then
mkdir -p "$HOME/Downloads/git/MultiCraft"
fi
cd $HOME/Downloads/git/MultiCraft || customDie "cd $HOME/Downloads/git/MultiCraft FAILED"
goodFlagFile=MultiCraft/CMakeLists.txt
if [ -f "`which git`" ]; then
echo "In `pwd`..."
if [ ! -d MultiCraft ]; then
git clone https://github.com/MultiCraft/MultiCraft.git || customDie "Cannot clone MultiCraft from `pwd`"
cd MultiCraft || customDie "Cannot cd MultiCraft from `pwd`"
else
cd MultiCraft || customDie "Cannot cd MultiCraft from `pwd`"
git pull || customDie "Cannot pull MultiCraft from `pwd`"
git pull || echo "WARNING: Cannot pull MultiCraft from `pwd`"
fi
else
if [ ! -f "$goodFlagFile" ]; then
@ -33,8 +38,13 @@ srcPath=.
flag1="-DOpenGL_GL_PREFERENCE=GLVND"
echo
echo "Running cmake srcPath..."
cmake $srcPath $flag1 || customDie "cmake failed. See any messages above for more information."
cmake $srcPath $flag1 -DRUN_IN_PLACE=1 -DENABLE_GETTEXT=1 -DENABLE_FREETYPE=1 -DENABLE_LEVELDB=1 || customDie "cmake failed. See any messages above for more information. Run ./install-minetest-build-deps.sh if you did not."
echo
echo "Running make..."
make
make -j$(nproc) || customDie "make failed. See any messages above for more information. Run ./install-minetest-build-deps.sh if you did not."
if [ -f "`pwd`/bin/MultiCraft" ]; then
echo "`pwd`/bin/MultiCraft"
else
echo "`pwd`"
fi
echo "Done."

3
install-minetest-build-deps.sh

@ -40,6 +40,7 @@ else
fi
if [ ! -z "$this_apt" ]; then
echo "Using $this_apt..."
# sudo $this_apt -y remove minetest-server
# sudo $this_apt -y remove minetest
sudo $this_apt update
@ -85,6 +86,7 @@ sudo $this_apt -y install \
elif [ -f "`command -v pacman`" ]; then
echo "Using pacman..."
# sudo pacman -R --noconfirm minetest-server
# sudo pacman -R --noconfirm minetest
sudo pacman -Syu --noconfirm \
@ -108,6 +110,7 @@ sudo pacman -Syu --noconfirm \
fi
elif [ ! -z "$this_dnf" ]; then
echo "Using $this_dnf..."
# sudo $this_dnf -y remove minetest-server
# sudo $this_dnf -y remove minetest
sudo $this_dnf -y install \

Loading…
Cancel
Save