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