style: whitespace between brackets in function declaration
Signed-off-by: Dominik Willner th33xitus@gmail.com
This commit is contained in:
@@ -11,7 +11,7 @@
|
||||
|
||||
set -e
|
||||
|
||||
function advanced_ui(){
|
||||
function advanced_ui() {
|
||||
top_border
|
||||
echo -e "| ${yellow}~~~~~~~~~~~~~ [ Advanced Menu ] ~~~~~~~~~~~~~${white} |"
|
||||
hr
|
||||
@@ -26,7 +26,7 @@ function advanced_ui(){
|
||||
back_footer
|
||||
}
|
||||
|
||||
function advanced_menu(){
|
||||
function advanced_menu() {
|
||||
do_action "" "advanced_ui"
|
||||
while true; do
|
||||
read -p "${cyan}####### Perform action:${white} " action
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
|
||||
set -e
|
||||
|
||||
function backup_ui(){
|
||||
function backup_ui() {
|
||||
top_border
|
||||
echo -e "| $(title_msg "~~~~~~~~~~~~~~ [ Backup Menu ] ~~~~~~~~~~~~~~") |"
|
||||
hr
|
||||
@@ -29,7 +29,7 @@ function backup_ui(){
|
||||
back_footer
|
||||
}
|
||||
|
||||
function backup_menu(){
|
||||
function backup_menu() {
|
||||
do_action "" "backup_ui"
|
||||
while true; do
|
||||
read -p "${cyan}####### Perform action:${white} " action
|
||||
|
||||
@@ -12,41 +12,41 @@
|
||||
set -e
|
||||
|
||||
#ui total width = 57 chars
|
||||
function top_border(){
|
||||
function top_border() {
|
||||
echo -e "/=======================================================\\"
|
||||
}
|
||||
|
||||
function bottom_border(){
|
||||
function bottom_border() {
|
||||
echo -e "\=======================================================/"
|
||||
}
|
||||
|
||||
function blank_line(){
|
||||
function blank_line() {
|
||||
echo -e "| |"
|
||||
}
|
||||
|
||||
function hr(){
|
||||
function hr() {
|
||||
echo -e "|-------------------------------------------------------|"
|
||||
}
|
||||
|
||||
function quit_footer(){
|
||||
function quit_footer() {
|
||||
hr
|
||||
echo -e "| ${red}Q) Quit${white} |"
|
||||
bottom_border
|
||||
}
|
||||
|
||||
function back_footer(){
|
||||
function back_footer() {
|
||||
hr
|
||||
echo -e "| ${green}B) « Back${white} |"
|
||||
bottom_border
|
||||
}
|
||||
|
||||
function back_help_footer(){
|
||||
function back_help_footer() {
|
||||
hr
|
||||
echo -e "| ${green}B) « Back${white} | ${yellow}H) Help [?]${white} |"
|
||||
bottom_border
|
||||
}
|
||||
|
||||
function print_header(){
|
||||
function print_header() {
|
||||
top_border
|
||||
echo -e "| $(title_msg "~~~~~~~~~~~~~~~~~ [ KIAUH ] ~~~~~~~~~~~~~~~~~") |"
|
||||
echo -e "| $(title_msg " Klipper Installation And Update Helper ") |"
|
||||
@@ -54,7 +54,7 @@ function print_header(){
|
||||
bottom_border
|
||||
}
|
||||
|
||||
function do_action(){
|
||||
function do_action() {
|
||||
clear && print_header
|
||||
### $1 is the action the user wants to fire
|
||||
$1
|
||||
@@ -63,7 +63,7 @@ function do_action(){
|
||||
$2
|
||||
}
|
||||
|
||||
function deny_action(){
|
||||
function deny_action() {
|
||||
clear && print_header
|
||||
print_error "Invalid command!"
|
||||
$1
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
|
||||
set -e
|
||||
|
||||
function install_ui(){
|
||||
function install_ui() {
|
||||
top_border
|
||||
echo -e "| ${green}~~~~~~~~~~~ [ Installation Menu ] ~~~~~~~~~~~${white} |"
|
||||
hr
|
||||
@@ -32,7 +32,7 @@ function install_ui(){
|
||||
back_footer
|
||||
}
|
||||
|
||||
function install_menu(){
|
||||
function install_menu() {
|
||||
clear && print_header
|
||||
install_ui
|
||||
|
||||
@@ -66,7 +66,7 @@ function install_menu(){
|
||||
install_menu
|
||||
}
|
||||
|
||||
function select_klipper_python_version(){
|
||||
function select_klipper_python_version() {
|
||||
top_border
|
||||
echo -e "| Please select the preferred Python version. | "
|
||||
echo -e "| The recommended version is Python 2.7. | "
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
|
||||
set -e
|
||||
|
||||
function main_ui(){
|
||||
function main_ui() {
|
||||
top_border
|
||||
echo -e "| $(title_msg "~~~~~~~~~~~~~~~ [ Main Menu ] ~~~~~~~~~~~~~~~") |"
|
||||
hr
|
||||
@@ -29,20 +29,20 @@ function main_ui(){
|
||||
quit_footer
|
||||
}
|
||||
|
||||
function get_kiauh_version(){
|
||||
function get_kiauh_version() {
|
||||
local version
|
||||
cd "${KIAUH_SRCDIR}"
|
||||
version="$(git describe HEAD --always --tags | cut -d "-" -f 1,2)"
|
||||
echo "${version}"
|
||||
}
|
||||
|
||||
function print_kiauh_version(){
|
||||
function print_kiauh_version() {
|
||||
local version
|
||||
version="$(printf "%-18s" "$(get_kiauh_version)")"
|
||||
echo "${cyan}${version}${white}"
|
||||
}
|
||||
|
||||
function print_status(){
|
||||
function print_status() {
|
||||
local status component="${1}"
|
||||
status=$(get_"${component}"_status)
|
||||
if [ "${status}" == "Not installed!" ]; then
|
||||
@@ -55,7 +55,7 @@ function print_status(){
|
||||
printf "%-28s" "${status}"
|
||||
}
|
||||
|
||||
function print_klipper_repo(){
|
||||
function print_klipper_repo() {
|
||||
read_kiauh_ini
|
||||
local repo klipper_status
|
||||
klipper_status=$(get_klipper_status)
|
||||
@@ -71,7 +71,7 @@ function print_klipper_repo(){
|
||||
printf "%-28s" "${repo}"
|
||||
}
|
||||
|
||||
function kiauh_update_dialog(){
|
||||
function kiauh_update_dialog() {
|
||||
[ ! "$(kiauh_update_avail)" == "true" ] && return
|
||||
top_border
|
||||
echo -e "|${green} New KIAUH update available! ${white}|"
|
||||
@@ -95,7 +95,7 @@ function kiauh_update_dialog(){
|
||||
done
|
||||
}
|
||||
|
||||
function main_menu(){
|
||||
function main_menu() {
|
||||
print_header
|
||||
#prompt for KIAUH update if update available
|
||||
kiauh_update_dialog
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
|
||||
set -e
|
||||
|
||||
function remove_ui(){
|
||||
function remove_ui() {
|
||||
top_border
|
||||
echo -e "| ${red}~~~~~~~~~~~~~~ [ Remove Menu ] ~~~~~~~~~~~~~~${white} |"
|
||||
hr
|
||||
@@ -30,7 +30,7 @@ function remove_ui(){
|
||||
back_footer
|
||||
}
|
||||
|
||||
function remove_menu(){
|
||||
function remove_menu() {
|
||||
do_action "" "remove_ui"
|
||||
while true; do
|
||||
read -p "${cyan}####### Perform action:${white} " action
|
||||
|
||||
@@ -93,7 +93,7 @@ function settings_ui() {
|
||||
back_help_footer
|
||||
}
|
||||
|
||||
function show_settings_help(){
|
||||
function show_settings_help() {
|
||||
local choice default_cfg="${cyan}${HOME}/klipper_config${white}"
|
||||
|
||||
top_border
|
||||
@@ -144,7 +144,7 @@ function show_settings_help(){
|
||||
done
|
||||
}
|
||||
|
||||
function settings_menu(){
|
||||
function settings_menu() {
|
||||
local action
|
||||
|
||||
clear && print_header
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
|
||||
set -e
|
||||
|
||||
function update_ui(){
|
||||
function update_ui() {
|
||||
top_border
|
||||
echo -e "| ${green}~~~~~~~~~~~~~~ [ Update Menu ] ~~~~~~~~~~~~~~${white} |"
|
||||
hr
|
||||
@@ -36,7 +36,7 @@ function update_ui(){
|
||||
back_footer
|
||||
}
|
||||
|
||||
function update_menu(){
|
||||
function update_menu() {
|
||||
unset update_arr
|
||||
do_action "" "update_ui"
|
||||
while true; do
|
||||
@@ -71,7 +71,7 @@ function update_menu(){
|
||||
update_menu
|
||||
}
|
||||
|
||||
function update_all(){
|
||||
function update_all() {
|
||||
while true; do
|
||||
if [ "${#update_arr[@]}" = "0" ]; then
|
||||
CONFIRM_MSG="Everything is already up to date!"
|
||||
|
||||
Reference in New Issue
Block a user