Exit after error

master
andryyy 2017-06-21 11:07:20 +02:00
parent a782cee8a1
commit b26ee88269
1 changed files with 1 additions and 0 deletions

View File

@ -61,6 +61,7 @@ echo -e "\e[32mMerging local with remote code (recursive, options: \"theirs\", \
git merge -Xtheirs -Xpatience -m "After update on ${DATE}" git merge -Xtheirs -Xpatience -m "After update on ${DATE}"
if [[ $? == 128 ]]; then if [[ $? == 128 ]]; then
echo -e "\e[31m\nOh no, what happened?\n=> You most likely added files to your local mailcow instance that were now added to the official mailcow repository. Please move them to another location before updating mailcow." echo -e "\e[31m\nOh no, what happened?\n=> You most likely added files to your local mailcow instance that were now added to the official mailcow repository. Please move them to another location before updating mailcow."
exit 1
elif [[ $? == 1 ]]; then elif [[ $? == 1 ]]; then
echo -e "\e[31mRun into conflict, trying to fix...\e[90m" echo -e "\e[31mRun into conflict, trying to fix...\e[90m"
git status --porcelain | grep -E "UD|DU" | awk '{print $2}' | xargs rm -v git status --porcelain | grep -E "UD|DU" | awk '{print $2}' | xargs rm -v