From e6a868662931e54ba15345f8e66a5e7e2052eb9e Mon Sep 17 00:00:00 2001 From: iVAN <88724353+ivan-hc@users.noreply.github.com> Date: Sun, 26 May 2024 04:43:46 +0200 Subject: [PATCH] Let non-AppMan users know how to get out of the AppMan mode loop --- APP-MANAGER | 26 ++++++++++++++++++-------- 1 file changed, 18 insertions(+), 8 deletions(-) diff --git a/APP-MANAGER b/APP-MANAGER index b925d0c94..c40a69a61 100755 --- a/APP-MANAGER +++ b/APP-MANAGER @@ -1,6 +1,6 @@ #!/usr/bin/env bash -AMVERSION="6.8.3" +AMVERSION="6.8.3-1" # Determine main repository and branch AMREPO="https://raw.githubusercontent.com/ivan-hc/AM/main" @@ -603,13 +603,6 @@ function _use_appman() { fi } -if [ "$AMCLI" == am ] 2>/dev/null; then - if test -f "$APPMANCONFIG"/appman-mode; then - _appman - AMCLIPATH="/opt/am/APP-MANAGER" - fi -fi - function _back_to_am() { if test -f "$APPMANCONFIG"/appman-mode; then rm -f "$APPMANCONFIG"/appman-mode @@ -619,6 +612,23 @@ function _back_to_am() { fi } +if [ "$AMCLI" == am ] 2>/dev/null; then + if test -f "$APPMANCONFIG"/appman-mode; then + case "$1" in + '--system') + _back_to_am + ;; + ''|*) + if ! test -f "$APPMANCONFIG"/appman-config; then + _appman_mode_enabled_message + fi + _appman + AMCLIPATH="/opt/am/APP-MANAGER" + ;; + esac + fi +fi + ############################################# # FUNCTION TO HANDLE ALL THE EXTERNAL MODULES #############################################