poikilos
2 years ago
3 changed files with 39 additions and 0 deletions
@ -0,0 +1,4 @@ |
|||
#!/bin/bash |
|||
cd /opt |
|||
sudo chown -R minebest:minebest linux-minetest-kit |
|||
sudo chmod -R g+w linux-minetest-kit |
@ -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 |
@ -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…
Reference in new issue