From 86d022736db1d1c3bd7d31fc211782e87159b02d Mon Sep 17 00:00:00 2001 From: pvincent Date: Sat, 22 Aug 2026 18:23:07 +0400 Subject: [PATCH] development mode upgrade --- lib/self-upgrade.bash | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/lib/self-upgrade.bash b/lib/self-upgrade.bash index ab5e553..3f93408 100644 --- a/lib/self-upgrade.bash +++ b/lib/self-upgrade.bash @@ -20,12 +20,17 @@ function development_upgrade { cd "$MIAOU_BASH_DIR"/ || return 12 # should not happen [[ -n "$(git status --porcelain)" ]] && - >&2 echo "ERROR: repository has uncommited changes" && + >&2 echo 'ERROR: repository has uncommited changes!' && builtin exit 12 - git pull - sudo_root - sudo miaou lib/initiate.bash + local git_output + git_output=$(git pull 2>&1) + if echo "$git_output" | grep -q 'up to date'; then + : # does nothing + else + sudo_root + sudo miaou lib/initiate.bash + fi } function system_upgrade {