Browse Source

added script options

master
poikilos 7 years ago
committed by Jacob Gustafson
parent
commit
215325d2af
  1. 46
      etc/game-install-ENLIVEN
  2. 8
      etc/minetestserver-install-git-all-backends.sh

46
etc/game-install-ENLIVEN

@ -10,10 +10,39 @@
# * Git version uses /home/*/minetest/games and /usr/local/share/minetest/games but the latter is used for minetestserver (minetest-server package) # * Git version uses /home/*/minetest/games and /usr/local/share/minetest/games but the latter is used for minetestserver (minetest-server package)
# * Arch stable version uses /usr/share/minetest/ # * Arch stable version uses /usr/share/minetest/
if [ "$1" = "version_0_5_enable=true" ]; then
if [ "$1" = "version_0_5_enable" ]; then version_0_5_enable="true"
elif [ "$2" = "version_0_5_enable=true" ]; then
version_0_5_enable="true" version_0_5_enable="true"
elif [ "$1" = "version_0_5_enable=false" ]; then
version_0_5_enable="false"
elif [ "$2" = "version_0_5_enable=false" ]; then
version_0_5_enable="false"
fi
if [ "$1" = "local_enable=true" ]; then
local_enable="true"
elif [ "$2" = "local_enable=true" ]; then
local_enable="true"
elif [ "$1" = "local_enable=false" ]; then
local_enable="false"
elif [ "$2" = "local_enable=false" ]; then
local_enable="false"
fi
echo
echo
if [ ! -z "$version_0_5_enable" ];then
echo "force version_0_5_enable: $version_0_5_enable"
fi fi
if [ ! -z "$local_enable" ];then
echo "force local_enable: $local_enable"
fi
echo
echo "3..."
sleep 1
echo "2..."
sleep 1
echo "1..."
sleep 1
# (Ubuntu 14.04 Trusty Tahr Server) folders were found using: # (Ubuntu 14.04 Trusty Tahr Server) folders were found using:
# cd / # cd /
# sudo find -name 'worlds' (worlds folder is in $HOME/.minetest) # sudo find -name 'worlds' (worlds folder is in $HOME/.minetest)
@ -83,14 +112,21 @@ if [ -d "$try_path" ]; then
# Arch linux # Arch linux
USR_SHARE_MINETEST="$try_path" USR_SHARE_MINETEST="$try_path"
fi fi
#if [ ! -d "$USR_SHARE_MINETEST" ]; then if [ "$local_enable" != "false" ]; then
# IF git version is installed # IF git version is installed
try_path="/usr/local/share/minetest" try_path="/usr/local/share/minetest"
if [ -d "$try_path" ]; then if [ -d "$try_path" ]; then
version_0_5_enable="true" #version_0_5_enable="true"
USR_SHARE_MINETEST="$try_path" USR_SHARE_MINETEST="$try_path"
fi fi
#fi fi
echo "USR_SHARE_MINETEST: $USR_SHARE_MINETEST"
echo "3..."
sleep 1
echo "2..."
sleep 1
echo "1..."
sleep 1
# UNUSED (unknown use): MT_GAMES_DIR=$HOME/.minetest/mods # UNUSED (unknown use): MT_GAMES_DIR=$HOME/.minetest/mods
# intentionally skip the slash in the following line since $USR_SHARE_MINETEST already starts with one: # intentionally skip the slash in the following line since $USR_SHARE_MINETEST already starts with one:
MT_BACKUP_GAMES_DIR=$HOME/Backup$USR_SHARE_MINETEST/games MT_BACKUP_GAMES_DIR=$HOME/Backup$USR_SHARE_MINETEST/games

8
etc/minetestserver-install-git-all-backends.sh

@ -75,7 +75,13 @@ git pull --all
cd .. cd ..
# heavily modified from forum url above due to hints from AUR files obtained via git clone https://aur.archlinux.org/minetest-git-leveldb.git # heavily modified from forum url above due to hints from AUR files obtained via git clone https://aur.archlinux.org/minetest-git-leveldb.git
echo "ENABLE_CURSES enables server-side terminal via --terminal option" echo "ENABLE_CURSES enables server-side terminal via --terminal option"
cmake . -DENABLE_GETTEXT=on -DENABLE_CURSES=on -DENABLE_FREETYPE=on -DENABLE_LEVELDB=on -DENABLE_CURL=on -DENABLE_GETTEXT=on -DENABLE_REDIS=on -DENABLE_POSTGRESQL=on -DRUN_IN_PLACE=off -DCMAKE_BUILD_TYPE=Release -DBUILD_SERVER=on -DBUILD_CLIENT=off build_what="-DBUILD_SERVER=on -DBUILD_CLIENT=off"
if [ "$1" = "both" ]; then
build_what="-DBUILD_SERVER=on -DBUILD_CLIENT=on"
elif [ "$1" = "client" ]; then
build_what="-DBUILD_SERVER=off -DBUILD_CLIENT=on"
fi
cmake . -DENABLE_GETTEXT=on -DENABLE_CURSES=on -DENABLE_FREETYPE=on -DENABLE_LEVELDB=on -DENABLE_CURL=on -DENABLE_GETTEXT=on -DENABLE_REDIS=on -DENABLE_POSTGRESQL=on -DRUN_IN_PLACE=off -DCMAKE_BUILD_TYPE=Release $build_what
# NOTE: as long as -DRUN_IN_PLACE=off, above installs correctly without -DCMAKE_INSTALL_PREFIX=/usr which for some reason is used by https://aur.archlinux.org/minetest-git.git # NOTE: as long as -DRUN_IN_PLACE=off, above installs correctly without -DCMAKE_INSTALL_PREFIX=/usr which for some reason is used by https://aur.archlinux.org/minetest-git.git
# -DCMAKE_BUILD_TYPE=Release as per https://aur.archlinux.org/minetest-git.git # -DCMAKE_BUILD_TYPE=Release as per https://aur.archlinux.org/minetest-git.git
make -j$(nproc) make -j$(nproc)

Loading…
Cancel
Save