Browse Source

fix miaou-bash helper

main
pvincent 2 weeks ago
parent
commit
bcc88406e7
  1. 8
      etc/profile.d/20-miaou-bash.sh
  2. 1
      lib/self-upgrade.bash

8
etc/profile.d/20-miaou-bash.sh

@ -3,11 +3,5 @@ export MIAOU_BASH_DIR
# useful when MIAOU_BASH_MODE=hosted/containerized # useful when MIAOU_BASH_MODE=hosted/containerized
if [[ -f /var/lib/miaou-bash/semver_current ]]; then if [[ -f /var/lib/miaou-bash/semver_current ]]; then
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
"$MIAOU_BASH_DIR"/bin/miaou-bash "$MIAOU_BASH_DIR"/lib/container-upgrade.bash
fi fi

1
lib/self-upgrade.bash

@ -5,6 +5,7 @@ INSTALL_URL='https://git.artcode.re/miaou/miaou-bash/raw/branch/main/install.sh'
# FUNCTIONS # FUNCTIONS
function container_upgrade { function container_upgrade {
echo "MIAOU_BASH_MODE=$MIAOU_BASH_MODE"
. "$MIAOU_BASH_DIR"/lib/container-upgrade.bash . "$MIAOU_BASH_DIR"/lib/container-upgrade.bash
} }

Loading…
Cancel
Save