Browse Source

self-upgrade reinitialize

main
pvincent 3 days ago
parent
commit
af7fedfce6
  1. 3
      doc/index.md
  2. 4
      lib/self-upgrade.bash

3
doc/index.md

@ -3,8 +3,9 @@
## Initiate again ## Initiate again
Rk: useful when timezone has changed or ghostty command has been installed afterwards 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 ## debug, use of MIAOU_DEBUG

4
lib/self-upgrade.bash

@ -34,7 +34,9 @@ function system_upgrade {
current=$("$MIAOU_BASH_DIR"/bin/miaou-bash --version) current=$("$MIAOU_BASH_DIR"/bin/miaou-bash --version)
latest=$("$MIAOU_BASH_DIR"/tools/wget_semver artcode miaou/miaou-bash) latest=$("$MIAOU_BASH_DIR"/tools/wget_semver artcode miaou/miaou-bash)
if [[ "$current" == "$latest" ]]; then 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 else
echo "new version available: $latest" echo "new version available: $latest"
#TODO: should download file self-upgrade.bash itself before calling it against #TODO: should download file self-upgrade.bash itself before calling it against

Loading…
Cancel
Save