From 13e4b7485ba64cea72848cd45eb563db52221971 Mon Sep 17 00:00:00 2001 From: Netkas Date: Thu, 14 Jan 2021 18:56:50 -0500 Subject: [PATCH] Updated bootstrap to check and apply for updates --- Docker/bootstrap | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/Docker/bootstrap b/Docker/bootstrap index d1deb88b..8697b868 100644 --- a/Docker/bootstrap +++ b/Docker/bootstrap @@ -9,6 +9,20 @@ if [ ! -f /firstrun.pass ]; then echo "[...] Restarting server in detached mode..." else cd /CoffeeHousePy + + echo "### Checking for updates ###" + git remote update + + UPSTREAM=${1:-'@{u}'} + LOCAL=$(git rev-parse @) + BASE=$(git merge-base @ "$UPSTREAM") + + if [ $LOCAL = $BASE ]; then + echo "### Applying update ###" + git pull + make clean install + fi + echo "### Starting CoffeeHouse-LangDetect ###" make start_langdetect & echo "### Starting CoffeeHouse-SpamDetect ###"