mirror of
https://github.com/mailcow/mailcow-dockerized.git
synced 2026-05-24 08:21:55 +00:00
improved _modules handling while running
This commit is contained in:
12
update.sh
12
update.sh
@@ -2,11 +2,15 @@
|
|||||||
|
|
||||||
############## Begin Function Section ##############
|
############## Begin Function Section ##############
|
||||||
|
|
||||||
source _modules/scripts/core.sh
|
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||||
source _modules/scripts/ipv6_controller.sh
|
BRANCH="$(cd "${SCRIPT_DIR}" && git rev-parse --abbrev-ref HEAD)"
|
||||||
|
|
||||||
source _modules/scripts/new_options.sh
|
MODULE_DIR="${SCRIPT_DIR}/_modules"
|
||||||
source _modules/scripts/migrate_options.sh
|
if [[ ! -d "${MODULE_DIR}" || -z "$(ls -A "${MODULE_DIR}")" ]]; then
|
||||||
|
echo -e "\e[33m_modules is missing or empty – fetching all Modules from origin/${BRANCH}…\e[0m"
|
||||||
|
git fetch origin "${BRANCH}"
|
||||||
|
git checkout "origin/${BRANCH}" -- _modules
|
||||||
|
fi
|
||||||
|
|
||||||
detect_major_update() {
|
detect_major_update() {
|
||||||
if [ ${BRANCH} == "master" ]; then
|
if [ ${BRANCH} == "master" ]; then
|
||||||
|
|||||||
Reference in New Issue
Block a user