diff --git a/doc/index.md b/doc/index.md index 929edac..d9224b7 100644 --- a/doc/index.md +++ b/doc/index.md @@ -3,8 +3,9 @@ ## Initiate again Rk: useful when timezone has changed or ghostty command has been installed afterwards + may require SUDO privilege -`miaou-bash --self-upgrade` #TODO: does not apply anymore +`miaou-bash --self-upgrade` ## debug, use of MIAOU_DEBUG diff --git a/lib/self-upgrade.bash b/lib/self-upgrade.bash index 557e22f..27a6718 100644 --- a/lib/self-upgrade.bash +++ b/lib/self-upgrade.bash @@ -34,7 +34,9 @@ function system_upgrade { current=$("$MIAOU_BASH_DIR"/bin/miaou-bash --version) latest=$("$MIAOU_BASH_DIR"/tools/wget_semver artcode miaou/miaou-bash) if [[ "$current" == "$latest" ]]; then - echo "up-to-date version: $current" + echo "up-to-date version: $current (Ctrl-c to bypass reinitialization)" + sudo_root + sudo miaou-bash "$MIAOU_BASH_DIR"/lib/initiate.bash else echo "new version available: $latest" #TODO: should download file self-upgrade.bash itself before calling it against