feat: KIAUH v4.0.0 #191
@@ -222,7 +222,7 @@ function start_flash_sd() {
|
||||
else
|
||||
printf "| ${i}) %-49s|\n" "${board_list[${i}]}"
|
||||
fi
|
||||
i=$((i + 1))
|
||||
i=$(( i + 1 ))
|
||||
done
|
||||
quit_footer
|
||||
|
||||
|
||||
@@ -259,8 +259,8 @@ function klipper_setup() {
|
||||
|
||||
### confirm message
|
||||
local confirm=""
|
||||
(( instance_arr[0] == 1)) && confirm="Klipper has been set up!"
|
||||
(( instance_arr[0] > 1)) && confirm="${instance_arr[0]} Klipper instances have been set up!"
|
||||
(( instance_arr[0] == 1 )) && confirm="Klipper has been set up!"
|
||||
(( instance_arr[0] > 1 )) && confirm="${instance_arr[0]} Klipper instances have been set up!"
|
||||
|
||||
print_confirm "${confirm}" && return
|
||||
}
|
||||
@@ -515,16 +515,16 @@ function get_klipper_status() {
|
||||
### count+1 for each found data-item from array
|
||||
local filecount=0
|
||||
for data in "${data_arr[@]}"; do
|
||||
[[ -e ${data} ]] && filecount=$(("${filecount}" + 1))
|
||||
[[ -e ${data} ]] && filecount=$(( filecount + 1 ))
|
||||
done
|
||||
|
||||
if (( filecount == ${#data_arr[*]})); then
|
||||
if (( filecount == ${#data_arr[*]} )); then
|
||||
if (( py_ver == 3 )); then
|
||||
status="Installed: ${sf_count}(py${py_ver})"
|
||||
else
|
||||
status="Installed: ${sf_count}"
|
||||
fi
|
||||
elif ((filecount == 0)); then
|
||||
elif (( filecount == 0 )); then
|
||||
status="Not installed!"
|
||||
else
|
||||
status="Incomplete!"
|
||||
|
||||
@@ -356,6 +356,7 @@ function ms_theme_installer_menu() {
|
||||
theme_repo+=("${col4}")
|
||||
done <<< "${theme_list}"
|
||||
|
||||
local option
|
||||
while true; do
|
||||
read -p "${cyan}Install theme:${white} " option
|
||||
if (( option > 0 && option < ${#theme_name[@]} )); then
|
||||
|
||||
@@ -209,7 +209,7 @@ function create_telegram_conf() {
|
||||
elif (( telegram_bot_count > 1 )); then
|
||||
local j=0 re="^[1-9][0-9]*$"
|
||||
|
||||
for ((i=1; i <= telegram_bot_count; i++ )); do
|
||||
for (( i=1; i <= telegram_bot_count; i++ )); do
|
||||
### overwrite config folder if name is only a number
|
||||
if [[ ${names[j]} =~ ${re} ]]; then
|
||||
cfg_dir="${KLIPPER_CONFIG}/printer_${names[${j}]}"
|
||||
@@ -219,7 +219,7 @@ function create_telegram_conf() {
|
||||
|
||||
### write multi instance config
|
||||
write_telegram_conf "${cfg_dir}" "${cfg}" "${log}"
|
||||
j=$((j+1))
|
||||
j=$(( j + 1 ))
|
||||
done && unset j
|
||||
|
||||
else
|
||||
|
||||
@@ -391,7 +391,7 @@ function get_octoprint_status() {
|
||||
|
||||
if (( sf_count == 0 )) && (( env_count == 0 )) && (( dir_count == 0 )); then
|
||||
status="Not installed!"
|
||||
elif (( sf_count == env_count)) && (( sf_count == dir_count )); then
|
||||
elif (( sf_count == env_count )) && (( sf_count == dir_count )); then
|
||||
status="Installed: ${sf_count}"
|
||||
else
|
||||
status="Incomplete!"
|
||||
|
||||
@@ -65,7 +65,7 @@ function rollback_component() {
|
||||
local count
|
||||
while true; do
|
||||
read -p "${cyan}###### Revert this amount of commits:${white} " count
|
||||
if [[ -n ${count} ]] && ((count > 0)); then
|
||||
if [[ -n ${count} ]] && (( count > 0 )); then
|
||||
status_msg "Revert ${component^} by ${count} commits ..."
|
||||
cd "${HOME}/${component}"
|
||||
if git reset --hard HEAD~"${count}"; then
|
||||
|
||||
Reference in New Issue
Block a user