Update UPDATE.sh

This commit is contained in:
Stefan Pejcic 2024-10-18 21:44:43 +02:00 committed by GitHub
parent d83cd3dffa
commit a309feedfc
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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
}