msg="Installing minetestserver ONLY (no param specified). If you want to install the client on your server (not normal practice) or are on a computer with a graphical desktop, add client or both param when calling this script."
warnings=""
if["$1"="both"];then
msg="Installing minetest client AND server (param specified: both)."
elif["$1"="client"];then
msg="Installing minetest client ONLY (param specified: client)."
else
if[ ! -z "$XDG_CURRENT_DESKTOP"];then
warnings="WARNING: Detected $XDG_CURRENT_DESKTOP...you probably meant to install client or both (use client or both param after this script)"
fi
fi
echo"This script compiles AND installs minetestserver (NOT run-in-place, but rather system-wide) with leveldb, redis, and defaults postgresql, doxygen, sqlite3"
echo
echo
echo"If you want to install the client on your server (not normal practice), add client or both param when calling this script."
echo$msg
echo$warnings
if[ ! -z "$warnings"];then
echo"You may want to cancel and correct warnings above..."
sleep 2
fi
#if [ -f "`command -v minetest`" ]; then
echo"Removing the non-git (packaged) version first (Press Ctrl C to cancel)..."
echo"* trying to remove any non-git (packaged) version first (Press Ctrl C to cancel)..."
# echo -e "\n\n\e[1;33mYou can run Minetest again by typing \"minetest\" in a terminal or selecting it in an applications menu.\nYou can install mods in ~/.minetest/mods, too.\e[0m"
else
echo"WARNING: cannot remove packaged version, because your package manager is not known by this script."
echo"Press Ctrl C to cancel, or wait to continue anyway..."