#!/bin/bash rsync -rtlv mtio:/opt/minebest/ /opt/minebest \ --exclude "mtkit/minetest/" \ --exclude "mtkit0/" \ --exclude "git-trees.save/" \ --exclude "tmp/" \ --exclude "mtkit/" \ ; # ^ exclude mtkit because it is downstream from linux-minetest-kit.zip # in prod (symlink to assemble/prod)! # (mtkit is the installed copy in the case of a server, and is used as # the install source when using the maintainer rsync copy as the # install source) code=$? if [ -L /opt/minebest/mtkit ]; then rm -f /opt/minebest/mtkit elif [ -d /opt/minebest/mtkit ]; then rm -rf /opt/minebest/mtkit fi if [ -L /tmp/lmk ]; then rm -f /tmp/lmk elif [ -d /tmp/lmk ]; then rm -rf /tmp/lmk fi unzip /opt/minebest/prod/linux-minetest-kit.zip -d /tmp/lmk mv /tmp/lmk/linux-minetest-kit /opt/minebest/mtkit GOOD_MTKIT_FLAG="/opt/minebest/mtkit/mtcompile-program.sh" if [ ! -f "$GOOD_MTKIT_FLAG" ]; then echo "Error: extracting /opt/minebest/prod/linux-minetest-kit.zip didn't seem to work. There is no '$GOOD_MTKIT_FLAG'." exit 1 fi # mtkit # - is the INSTALLED copy, # - maybe OLDER than linux-minetest-kit.zip! # prod # - delete prod/* to test building prod using "bash -e buildskipwin.sh" # ^ exclude remotely-built copies of the program: # - mtkit/minetest/ # - prod/ ? # ^ The real git-trees is in assemble/ so do not exclude # --exclude "assemble/" \ # --info=progress2 \ # if [ $code -eq 0 ]; then echo "Updating /opt/minebest...OK" else echo "Updating /opt/minebest...FAILED" fi cd /opt/minebest cat <