Browse Source

Add lmk scripts.

master
poikilos 2 years ago
parent
commit
0a0fe09e6f
  1. 4
      utilities/fix-lmk-permissions.sh
  2. 22
      utilities/get-lmk.sh
  3. 13
      utilities/lmk-run

4
utilities/fix-lmk-permissions.sh

@ -0,0 +1,4 @@
#!/bin/bash
cd /opt
sudo chown -R minebest:minebest linux-minetest-kit
sudo chmod -R g+w linux-minetest-kit

22
utilities/get-lmk.sh

@ -0,0 +1,22 @@
#!/bin/bash
if [ -d "linux-minetest-kit" ]; then
>&2 echo "Error: linux-minetest-kit is already here. To update it safely, rename it, otherwise do:"
>&2 echo " rm -rf '`pwd`/linux-minetest-kit'"
exit 1
fi
cd ~
ZIP_NAME=linux-minetest-kit.zip
REMOTE_ZIP=mtio:/opt/minebest/assemble/prod/linux-minetest-kit.zip
rsync -tvP $REMOTE_ZIP .
code=$?
if [ $code -ne 0 ]; then
>&2 echo "Error: 'rsync -tvP $REMOTE_ZIP .' failed in \"`pwd`\". Make sure it was built on the other server or change $0 to match the correct location."
exit $code
fi
unzip $ZIP_NAME
code=$?
if [ $code -ne 0 ]; then
>&2 echo "Error: 'unzip $ZIP_NAME' failed in \"`pwd`\"."
exit $code
fi
exit 0

13
utilities/lmk-run

@ -0,0 +1,13 @@
#!/bin/sh
if [ "x$1" != "x" ]; then
LMK_MODE="$1"
fi
if [ "x$LMK_MODE" = "x" ]; then
echo "Error: (or LMK_MODE in environment). It should be classic, finetest, or trolltest."
exit 1
fi
if [ ! -d "linux-minetest-kit" ]; then
echo "Error: linux-minetest-kit is not a directory in `pwd`. Run get-lmk.sh first."
exit 1
fi
sudo -u minebest perl mtcompile-program.pl build --$LMK_MODE --server
Loading…
Cancel
Save