refactor(obico.sh): refactor obico status

initializes `is_linked` as true.
switches it to false as soon as the first non linked instance is detected. status is then printed as non linked in the main menu.

Signed-off-by: Dominik Willner <th33xitus@gmail.com>
This commit is contained in:
th33xitus
2022-08-13 16:01:18 +02:00
parent d11323d55d
commit 7d5b4e7242
2 changed files with 24 additions and 11 deletions

View File

@@ -49,7 +49,10 @@ function print_status() {
if [[ ${status} == "Not installed!" ]]; then
status="${red}${status}${white}"
elif [[ ${status} == "Incomplete!" ]] || [[ ${status} == "Not linked!" ]]; then
elif [[ ${status} == "Incomplete!" ]]; then
status="${yellow}${status}${white}"
elif [[ ${status} == "Not linked!" ]]; then
### "Not linked!" is only required for Moonraker-obico
status="${yellow}${status}${white}"
else
status="${green}${status}${white}"