|
@@ -9,6 +9,17 @@ if [ "${CONTAINER_NAME}" != "$(basename $(pwd))" ]; then
|
|
|
exit 1
|
|
|
fi
|
|
|
|
|
|
+CURRF="$(md5sum "${0}")"
|
|
|
+
|
|
|
+git pull
|
|
|
+
|
|
|
+if [ "${CURRF}" != "$(md5sum "${0}")" ]; then
|
|
|
+ cprint "File changes on last pull. Restarting..."
|
|
|
+ ${SELF}
|
|
|
+ exit 1
|
|
|
+fi
|
|
|
+exit 1
|
|
|
+
|
|
|
function cprint {
|
|
|
ERR='\033[0;31m'
|
|
|
OK='\033[0;32m'
|
|
@@ -130,7 +141,7 @@ if [ $? -ne 0 ]; then
|
|
|
lxc file push "$(pwd)" "${CONTAINER_NAME}/$(container_home)" -rq
|
|
|
else
|
|
|
cprint "Pulling repo"
|
|
|
- git pull
|
|
|
+ container_snap_sh "git pull"
|
|
|
fi
|
|
|
|
|
|
TAG=$(git tag | tail -n 1)
|