feat: display klipper repo in main menu

Signed-off-by: Dominik Willner th33xitus@gmail.com
This commit is contained in:
th33xitus
2022-04-26 20:23:17 +02:00
parent 7c8973252e
commit ccc831fee4
8 changed files with 78 additions and 49 deletions

View File

@@ -244,7 +244,7 @@ function update_fluidd(){
#================== FLUIDD STATUS ==================#
#===================================================#
function fluidd_status(){
function get_fluidd_status(){
local status
local data_arr=("${FLUIDD_DIR}" "${NGINX_SA}/fluidd" "${NGINX_SE}/fluidd")
@@ -254,12 +254,12 @@ function fluidd_status(){
[ -e "${data}" ] && filecount=$(("${filecount}" + 1))
done
if [ "${filecount}" == "${#data_arr[*]}" ]; then
status="${green}Installed!${white} "
elif [ "${filecount}" == 0 ]; then
status="${red}Not installed!${white} "
if (( filecount == ${#data_arr[*]})); then
status="Installed!"
elif ((filecount == 0)); then
status="Not installed!"
else
status="${yellow}Incomplete!${white} "
status="Incomplete!"
fi
echo "${status}"
}