From 40888a713a7e66fbbfdd69e73bcb535a0c337d9c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9?= Date: Tue, 16 Oct 2018 21:40:25 +0200 Subject: [PATCH] [Update] Checkout pcre header check if missing, fixes #1906 --- update.sh | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/update.sh b/update.sh index 106e53b0..4d4654e8 100755 --- a/update.sh +++ b/update.sh @@ -254,8 +254,9 @@ sleep 2 docker-compose down # Fix header check -[[ -f data/conf/postfix/mailcow_anonymize_headers.pcre ]] && \ +if [[ -f data/conf/postfix/mailcow_anonymize_headers.pcre ]]; then mv data/conf/postfix/mailcow_anonymize_headers.pcre data/conf/postfix/mailcow_anonymize_headers.pcre_ +fi # Silently fixing remote url from andryyy to mailcow git remote set-url origin https://github.com/mailcow/mailcow-dockerized echo -e "\e[32mCommitting current status...\e[0m" @@ -285,7 +286,10 @@ elif [[ ${MERGE_RETURN} != 0 ]]; then echo "Run docker-compose up -d to restart your stack without updates or try again after fixing the mentioned errors." exit 1 fi - +# Make sure missing files do exist, checkout missing files if any +if [[ ! -f data/conf/postfix/mailcow_anonymize_headers.pcre ]]; then + git checkout origin/${BRANCH} data/conf/postfix/mailcow_anonymize_headers.pcre +fi echo -e "\e[32mFetching new docker-compose version...\e[0m" sleep 2