Browse Source

Fix faulty use of '&&' within variable-based shell commands.

master
poikilos 4 years ago
parent
commit
4ae306490f
  1. 3
      build-minetest-here.sh
  2. 10
      mtbuild.rc

3
build-minetest-here.sh

@ -51,6 +51,9 @@ fi
if [ ! -z "$INSTALL_DEPS" ]; then
echo "* missing $INSTALL_DEPS"
if [ ! -z "$REFRESH_OS_INSTALLER_CMD" ]; then
echo " * Running '$REFRESH_OS_INSTALLER_CMD'"
fi
echo " * Running '$DEPS_INSTALL'..."
$DEPS_INSTALL
if [ $? -ne 0 ]; then

10
mtbuild.rc

@ -2,19 +2,25 @@
FEDORA_DEPS="gcc-c++ irrlicht-devel gettext freetype cmake bzip2-devel libpng libjpeg-turbo libXxf86vm mesa-libGLU libsqlite3x-devel libogg-devel libvorbis-devel openal-devel curl-devel luajit-devel lua-devel leveldb-devel ncurses-devel redis hiredis-devel gmp-devel libtool"
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"
UBUNTU_DEPS_INSTALL="sudo apt-get install -y $UBUNTU_DEPS"
DEPS_INSTALL_MSG="something like $UBUNTU_DEPS_INSTALL #or $FEDORA_DEPS_INSTALL"
REFRESH_OS_INSTALLER_CMD=
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"
DEPS_INSTALL="$FEDORA_DEPS_INSTALL"
elif [ -f "`command -v apt`" ]; then
UBUNTU_DEPS_INSTALL="sudo apt update && sudo apt install -y $UBUNTU_DEPS"
REFRESH_OS_INSTALLER_CMD="sudo apt update"
UBUNTU_DEPS_INSTALL="sudo apt install -y $UBUNTU_DEPS"
DEPS_INSTALL="$UBUNTU_DEPS_INSTALL"
elif [ -f "`command -v apt-get`" ]; then
REFRESH_OS_INSTALLER_CMD="sudo apt-get update"
DEPS_INSTALL="$UBUNTU_DEPS_INSTALL"
fi
if [ ! -z "$DEPS_INSTALL" ]; then
DEPS_INSTALL_MSG="$DEPS_INSTALL"
if [ ! -z "$REFRESH_OS_INSTALLER_CMD" ]; then
DEPS_INSTALL_MSG="$REFRESH_OS_INSTALLER_CMD && $DEPS_INSTALL"
fi
fi

Loading…
Cancel
Save