no more container-upgrade. self-upgrade does all

This commit is contained in:
pvincent
2026-09-02 11:02:30 +04:00
parent 119467d416
commit af0b650c23
3 changed files with 20 additions and 17 deletions
+19 -2
View File
@@ -5,8 +5,24 @@ INSTALL_URL='https://git.artcode.re/miaou/miaou-bash/raw/branch/main/install.sh'
# FUNCTIONS
function container_upgrade {
echo "MIAOU_BASH_MODE=$MIAOU_BASH_MODE"
. "$MIAOU_BASH_DIR"/lib/container-upgrade.bash
local container_version host_version
host_version=$(<"$MIAOU_BASH_DIR"/.semver_git_tag)
if [[ -f /var/lib/miaou-bash/semver_current ]]; then
container_version=$(</var/lib/miaou-bash/semver_current)
else
container_version='M.m.p'
fi
if [[ "$container_version" == "$host_version" ]]; then
echo -n "initiating new version: $host_version"
else
echo -n "upgrading from $container_version to $host_version"
fi
echo ' (Ctrl-c to bypass)'
if sudo_root; then
sudo -E miaou-bash "$MIAOU_BASH_DIR"/lib/initiate.bash
else
builtin exit 1
fi
}
function development_upgrade {
@@ -80,6 +96,7 @@ function perform_upgrade {
source "$MIAOU_BASH_DIR"/lib/functions.bash
fetch_mode
echo "upgrading mode: $MIAOU_BASH_MODE"
case "$MIAOU_BASH_MODE" in
hosted) container_upgrade ;;
development) development_upgrade ;;