container-upgrade

This commit is contained in:
pvincent
2026-08-23 17:34:32 +04:00
parent d66451c61c
commit e7c71cf2db
5 changed files with 17 additions and 16 deletions
+14
View File
@@ -0,0 +1,14 @@
function upgrade {
local container_version host_version
container_version=$(</var/lib/miaou-bash/semver_current)
host_version=$(<"$MIAOU_BASH_DIR"/.semver_git_tag)
if [[ "$container_version" != "$host_version" ]]; then
echo -n "MIAOU-BASH: initiate new version: $host_version"
[[ "$UID" -ne 0 ]] && echo " (CTRL+c to bypass)" || echo
sudo -E miaou-bash "$MIAOU_BASH_DIR"/lib/initiate.bash
fi
}
if [[ -f /var/lib/miaou-bash/semver_current ]]; then
upgrade
fi
-2
View File
@@ -1,5 +1,3 @@
#!/usr/bin/env miaou-bash
# Constants
GIT_URL=git@git.artcode.re:miaou/miaou-bash.git
-2
View File
@@ -1,5 +1,3 @@
#!/usr/bin/env miaou-bash
# CONSTANTS
readonly AZERTY_ZONES=(
+3 -10
View File
@@ -1,18 +1,11 @@
#!/usr/bin/env miaou-bash
# CONSTANTS
INSTALL_URL='https://git.artcode.re/miaou/miaou-bash/raw/branch/main/install.sh'
# FUNCTIONS
function hosted_upgrade {
cat >&2 <<EOF
FAILURE:
You are running inside a container within the HOSTED miaou mode.
Perform the same action again underneath HOST machine!
EOF
builtin exit 10
function container_upgrade {
. "$MIAOU_BASH_DIR"/lib/container-upgrade.bash
}
function development_upgrade {
@@ -74,7 +67,7 @@ function perform_upgrade {
source "$MIAOU_BASH_DIR"/lib/functions.bash
fetch_mode
case "$MIAOU_BASH_MODE" in
hosted) hosted_upgrade ;;
hosted) container_upgrade ;;
development) development_upgrade ;;
system) system_upgrade ;;
esac
-2
View File
@@ -1,5 +1,3 @@
#!/usr/bin/env miaou-bash
# Constants
BACKUP_SUFFIX='.ORIGINAL'