container-upgrade
This commit is contained in:
@@ -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
|
||||||
@@ -1,5 +1,3 @@
|
|||||||
#!/usr/bin/env miaou-bash
|
|
||||||
|
|
||||||
# Constants
|
# Constants
|
||||||
|
|
||||||
GIT_URL=git@git.artcode.re:miaou/miaou-bash.git
|
GIT_URL=git@git.artcode.re:miaou/miaou-bash.git
|
||||||
|
|||||||
@@ -1,5 +1,3 @@
|
|||||||
#!/usr/bin/env miaou-bash
|
|
||||||
|
|
||||||
# CONSTANTS
|
# CONSTANTS
|
||||||
|
|
||||||
readonly AZERTY_ZONES=(
|
readonly AZERTY_ZONES=(
|
||||||
|
|||||||
+3
-10
@@ -1,18 +1,11 @@
|
|||||||
#!/usr/bin/env miaou-bash
|
|
||||||
|
|
||||||
# CONSTANTS
|
# CONSTANTS
|
||||||
|
|
||||||
INSTALL_URL='https://git.artcode.re/miaou/miaou-bash/raw/branch/main/install.sh'
|
INSTALL_URL='https://git.artcode.re/miaou/miaou-bash/raw/branch/main/install.sh'
|
||||||
|
|
||||||
# FUNCTIONS
|
# FUNCTIONS
|
||||||
|
|
||||||
function hosted_upgrade {
|
function container_upgrade {
|
||||||
cat >&2 <<EOF
|
. "$MIAOU_BASH_DIR"/lib/container-upgrade.bash
|
||||||
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 development_upgrade {
|
function development_upgrade {
|
||||||
@@ -74,7 +67,7 @@ function perform_upgrade {
|
|||||||
source "$MIAOU_BASH_DIR"/lib/functions.bash
|
source "$MIAOU_BASH_DIR"/lib/functions.bash
|
||||||
fetch_mode
|
fetch_mode
|
||||||
case "$MIAOU_BASH_MODE" in
|
case "$MIAOU_BASH_MODE" in
|
||||||
hosted) hosted_upgrade ;;
|
hosted) container_upgrade ;;
|
||||||
development) development_upgrade ;;
|
development) development_upgrade ;;
|
||||||
system) system_upgrade ;;
|
system) system_upgrade ;;
|
||||||
esac
|
esac
|
||||||
|
|||||||
@@ -1,5 +1,3 @@
|
|||||||
#!/usr/bin/env miaou-bash
|
|
||||||
|
|
||||||
# Constants
|
# Constants
|
||||||
|
|
||||||
BACKUP_SUFFIX='.ORIGINAL'
|
BACKUP_SUFFIX='.ORIGINAL'
|
||||||
|
|||||||
Reference in New Issue
Block a user