From 215325d2afbae0f474590d9e6eaa8e5167bc762b Mon Sep 17 00:00:00 2001 From: poikilos <7557867+poikilos@users.noreply.github.com> Date: Wed, 28 Feb 2018 13:22:06 -0500 Subject: [PATCH] added script options --- etc/game-install-ENLIVEN | 46 +++++++++++++++++-- ...minetestserver-install-git-all-backends.sh | 8 +++- 2 files changed, 48 insertions(+), 6 deletions(-) diff --git a/etc/game-install-ENLIVEN b/etc/game-install-ENLIVEN index aac45f9..91eac8d 100755 --- a/etc/game-install-ENLIVEN +++ b/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) # * Arch stable version uses /usr/share/minetest/ - -if [ "$1" = "version_0_5_enable" ]; then +if [ "$1" = "version_0_5_enable=true" ]; then + version_0_5_enable="true" +elif [ "$2" = "version_0_5_enable=true" ]; then 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 +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: # cd / # sudo find -name 'worlds' (worlds folder is in $HOME/.minetest) @@ -83,14 +112,21 @@ if [ -d "$try_path" ]; then # Arch linux USR_SHARE_MINETEST="$try_path" fi -#if [ ! -d "$USR_SHARE_MINETEST" ]; then +if [ "$local_enable" != "false" ]; then # IF git version is installed try_path="/usr/local/share/minetest" if [ -d "$try_path" ]; then - version_0_5_enable="true" + #version_0_5_enable="true" USR_SHARE_MINETEST="$try_path" 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 # 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 diff --git a/etc/minetestserver-install-git-all-backends.sh b/etc/minetestserver-install-git-all-backends.sh index bc175dd..a9fee27 100644 --- a/etc/minetestserver-install-git-all-backends.sh +++ b/etc/minetestserver-install-git-all-backends.sh @@ -75,7 +75,13 @@ git pull --all 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 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 # -DCMAKE_BUILD_TYPE=Release as per https://aur.archlinux.org/minetest-git.git make -j$(nproc)