From a309feedfc1354c272079e24117ce009c20c36da Mon Sep 17 00:00:00 2001 From: Stefan Pejcic Date: Fri, 18 Oct 2024 21:44:43 +0200 Subject: [PATCH] Update UPDATE.sh --- version/0.3.3/UPDATE.sh | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/version/0.3.3/UPDATE.sh b/version/0.3.3/UPDATE.sh index 328961f8..5ece3eb3 100644 --- a/version/0.3.3/UPDATE.sh +++ b/version/0.3.3/UPDATE.sh @@ -151,7 +151,25 @@ print_space_and_line() { update_configuration_files() { echo "Updating configuration files in /etc/openpanel/" - cd /etc/openpanel && git pull + cd /etc/openpanel/ + + git stash # stash local conf + + # update from gh + if git pull origin main; then + echo "Successfully pulled the latest changes." + else + echo "There were merge conflicts." + if git ls-files -u | grep -q "^"; then + echo "Conflicted files:" + git ls-files -u + else + echo "No conflicts, but pull failed for another reason." + fi + fi + + git stash pop # restore local conf + }