Browse Source

Fix package manager detection.

master
poikilos 4 years ago
parent
commit
88db56be47
  1. 8
      build-minetest-here.sh
  2. 2
      mtbuild.rc
  3. 5
      reset-minetest-install-source.sh

8
build-minetest-here.sh

@ -9,6 +9,7 @@ customExit(){
# echo
#fi
# cd $mybuild || customExit "$0: cd build failed in '`pwd`'."
printf "* detecting EnlivenMinetest..."
if [ -z "$ENLIVEN_REPO" ]; then
try_default_enliven_repo="$HOME/git/EnlivenMinetest"
@ -24,11 +25,15 @@ if [ -z "$ENLIVEN_REPO" ]; then
fi
source mtbuild.rc
if [ $? -ne 0 ]; then
printf "* trying \"$ENLIVEN_REPO/mtbuild.rc\"..."
source "$ENLIVEN_REPO/mtbuild.rc"
if [ $? -ne 0 ]; then
echo "FAILED"
echo "Error:"
echo "source mtbuild.rc failed. Try adding it to the path or $try_default_enliven_repo (or set ENLIVEN_REPO)"
exit 1
else
echo "OK"
fi
fi
@ -45,9 +50,12 @@ if [ ! -f "`command -v make`" ]; then
fi
if [ ! -z "$INSTALL_DEPS" ]; then
echo "* missing $INSTALL_DEPS"
echo " * Running '$DEPS_INSTALL'..."
$DEPS_INSTALL
if [ $? -ne 0 ]; then
echo "Installing dependencies failed."
exit 1
fi
fi

2
mtbuild.rc

@ -4,7 +4,7 @@ FEDORA_DEPS_INSTALL="sudo dnf install -y $FEDORA_DEPS"
UBUNTU_DEPS="libncurses5-dev libgettextpo-dev doxygen libspatialindex-dev libpq-dev postgresql-server-dev-all git build-essential libirrlicht-dev libgettextpo0 libfreetype6-dev cmake libbz2-dev libpng12-dev libjpeg8-dev libxxf86vm-dev libgl1-mesa-dev libsqlite3-dev libogg-dev libvorbis-dev libopenal-dev libcurl4-openssl-dev libluajit-5.1-dev liblua5.1-0-dev libleveldb-dev"
UBUNTU_DEPS_INSTALL="sudo apt-get update && sudo apt-get install -y $UBUNTU_DEPS"
DEPS_INSTALL_MSG="something like $UBUNTU_DEPS_INSTALL #or $FEDORA_DEPS_INSTALL"
if [ ! -f "`command -v dnf`" ]; then
if [ -f "`command -v dnf`" ]; then
DEPS_INSTALL="$FEDORA_DEPS_INSTALL"
elif [ -f "`command -v yum`" ]; then
FEDORA_DEPS_INSTALL="sudo yum install -y $FEDORA_DEPS"

5
reset-minetest-install-source.sh

@ -275,13 +275,18 @@ if [ -z "$ENLIVEN_REPO" ]; then
fi
source mtbuild.rc
if [ $? -ne 0 ]; then
printf "* trying \"$ENLIVEN_REPO/mtbuild.rc\"..."
source "$ENLIVEN_REPO/mtbuild.rc"
if [ $? -ne 0 ]; then
echo "FAILED"
echo "Error:"
echo "source mtbuild.rc failed. Try adding it to the path or $try_default_enliven_repo (or set ENLIVEN_REPO)"
exit 1
else
echo "OK"
fi
fi
if [ $mtLibrariesCompileResult -ne 0 ]; then
cat "$extracted_path/libraries.log"
echo

Loading…
Cancel
Save