public
nobgit
read
NobMail
Based on mailcow: dockerized
Languages
Repository composition by tracked source files.
PHP
49%
JavaScript
35%
HTML
9%
CSS
4%
Shell
2%
Python
1%
Lua
0%
Perl
0%
Ruby
0%
SCSS
0%
Create file
Wiki Documentation
Clone
https://nobgit.com/orgs/nobgit/nobmail.git
ssh://[email protected]:2222/orgs/nobgit/nobmail.git
Commit
Fix repo change when running in forced mode
5a10f2dd
update.sh | 11 ++++++++---
1 file changed, 8 insertions(+), 3 deletions(-)
Diff
diff --git a/update.sh b/update.sh
index 8ecd3f14..419f85f4 100755
--- a/update.sh
+++ b/update.sh
@@ -891,9 +891,14 @@ if [ "$CURRENT_REPO" != "$DEFAULT_REPO" ]; then
echo "The Repository currently used is not the default Mailcow Repository."
echo "Currently Repository: $CURRENT_REPO"
echo "Default Repository: $DEFAULT_REPO"
- read -r -p "Should it be changed back to default? [y/N] " repo_response
- if [[ "$repo_response" =~ ^([yY][eE][sS]|[yY])+$ ]]; then
- git remote set-url origin $DEFAULT_REPO
+ if [ ! $FORCE ]; then
+ read -r -p "Should it be changed back to default? [y/N] " repo_response
+ if [[ "$repo_response" =~ ^([yY][eE][sS]|[yY])+$ ]]; then
+ git remote set-url origin $DEFAULT_REPO
+ fi
+ else
+ echo "Running in forced mode... setting Repo to default!"
+ git remote set-url origin $DEFAULT_REPO
fi
fi