Fix dialog arguments

This commit is contained in:
Bob Mottram 2018-03-04 19:08:28 +00:00
parent 472da22b14
commit 8c75814291
4 changed files with 23 additions and 12 deletions

View File

@ -121,10 +121,11 @@ function show_apps {
app_index=$((app_index+1))
done
# shellcheck disable=SC2086
choices=$(dialog --stdout --backtitle $"Freedombone" \
--title $"Add/Remove Applications" \
--checklist $'Choose:' \
27 40 20 "$applist")
27 40 20 $applist)
# shellcheck disable=SC2181
if [ $? -eq 0 ]; then
@ -258,7 +259,7 @@ clear
remove_apps_selected
if [[ $1 == "add-all" ]]; then
if [[ "$1" == "add-all" ]]; then
install_apps_selected add-all
else
install_apps_selected

View File

@ -808,10 +808,11 @@ function choose_system_variant {
n=$((n+1))
done
# shellcheck disable=SC2086
variant_choice=$(dialog --stdout --backtitle $"Freedombone Configuration" \
--title $"Type of Installation" \
--radiolist $'Choose:' \
27 40 20 "$varslist")
27 40 20 $varslist)
# shellcheck disable=SC2181
if [ $? -eq 0 ]; then
@ -1078,7 +1079,8 @@ function select_user {
if [ $i -eq 1 ]; then
SELECTED_USERNAME="${name[0]}"
else
user_index=$(dialog --backtitle $"Freedombone Configuration" --title $"Select User" --menu $"Select one of the following:" 24 40 17 "${W[@]}" 3>&2 2>&1 1>&3)
# shellcheck disable=SC2068
user_index=$(dialog --backtitle $"Freedombone Configuration" --title $"Select User" --menu $"Select one of the following:" 24 40 17 ${W[@]} 3>&2 2>&1 1>&3)
# shellcheck disable=SC2181
if [ $? -eq 0 ]; then

View File

@ -215,7 +215,8 @@ function passwords_select_user {
if [ $i -eq 1 ]; then
SELECTED_USERNAME="${name[0]}"
else
user_index=$(dialog --backtitle $"Freedombone Control Panel" --title $"Select User" --menu $"Select one of the following:" 24 40 17 "${W[@]}" 3>&2 2>&1 1>&3)
# shellcheck disable=SC2068
user_index=$(dialog --backtitle $"Freedombone Control Panel" --title $"Select User" --menu $"Select one of the following:" 24 40 17 ${W[@]} 3>&2 2>&1 1>&3)
# shellcheck disable=SC2181
if [ $? -eq 0 ]; then
@ -241,7 +242,8 @@ function passwords_show_apps {
W+=("$i" "mariadb")
name+=("mariadb")
selected_app_index=$(dialog --backtitle $"Freedombone Control Panel" --title $"Select App" --menu $"Select one of the following:" 24 40 17 "${W[@]}" 3>&2 2>&1 1>&3)
# shellcheck disable=SC2068
selected_app_index=$(dialog --backtitle $"Freedombone Control Panel" --title $"Select App" --menu $"Select one of the following:" 24 40 17 ${W[@]} 3>&2 2>&1 1>&3)
# shellcheck disable=SC2181
if [ $? -eq 0 ]; then
@ -617,7 +619,8 @@ function select_user {
if [ $i -eq 1 ]; then
SELECTED_USERNAME="${name[0]}"
else
user_index=$(dialog --backtitle $"Freedombone Control Panel" --title $"Select User" --menu $"Select one of the following:" 24 40 17 "${W[@]}" 3>&2 2>&1 1>&3)
# shellcheck disable=SC2068
user_index=$(dialog --backtitle $"Freedombone Control Panel" --title $"Select User" --menu $"Select one of the following:" 24 40 17 ${W[@]} 3>&2 2>&1 1>&3)
# shellcheck disable=SC2181
if [ $? -eq 0 ]; then
@ -762,7 +765,8 @@ function remove_user_from_mailing_list {
i=$((i+1))
W+=("$i" $"Exit back to user mainenance")
list_selected=$(dialog --default-item "$i" --backtitle $"Freedombone Control Panel" --title $"Remove a mailing list for $SELECTED_USERNAME" --menu $"Select one of the following:" 24 50 17 "${W[@]}" 3>&2 2>&1 1>&3)
# shellcheck disable=SC2068
list_selected=$(dialog --default-item "$i" --backtitle $"Freedombone Control Panel" --title $"Remove a mailing list for $SELECTED_USERNAME" --menu $"Select one of the following:" 24 50 17 ${W[@]} 3>&2 2>&1 1>&3)
# shellcheck disable=SC2181
if [ $? -eq 0 ]; then # Exit with OK
@ -1147,10 +1151,11 @@ function restore_data_from_storage {
n=$((n+1))
app_list+=("$ExitStr")
# shellcheck disable=SC2086
choice=$(dialog --stdout --backtitle $"Freedombone" \
--title "$RestoreStr" \
--radiolist $'Choose:' \
30 50 20 "$applist")
30 50 20 $applist)
# shellcheck disable=SC2181
if [ $? -ne 0 ]; then
@ -2246,10 +2251,11 @@ function menu_app_settings {
applist="$applist $n $backstr on"
appnames+=("Exit")
# shellcheck disable=SC2086
choice=$(dialog --stdout --backtitle $"Freedombone" \
--title $"Change settings for an App" \
--radiolist $'Choose:' \
26 40 30 "$applist")
26 40 30 $applist)
# shellcheck disable=SC2181
if [ $? -eq 0 ]; then

View File

@ -91,7 +91,8 @@ function remove_user_from_mailing_list {
i=$((i+1))
W+=("$i" $"Exit back to filtering rules menu")
list_selected=$(dialog --default-item "$i" --backtitle $"Freedombone User Control Panel" --title $"Remove yourself from a mailing list" --menu $"Select one of the following:" 24 50 17 "${W[@]}" 3>&2 2>&1 1>&3)
# shellcheck disable=SC2068
list_selected=$(dialog --default-item "$i" --backtitle $"Freedombone User Control Panel" --title $"Remove yourself from a mailing list" --menu $"Select one of the following:" 24 50 17 ${W[@]} 3>&2 2>&1 1>&3)
# shellcheck disable=SC2181
if [ $? -eq 0 ]; then # Exit with OK
@ -854,10 +855,11 @@ function menu_run_client_app {
applist="$applist $n $backstr on"
appnames+=("Exit")
# shellcheck disable=SC2086
choice=$(dialog --stdout --backtitle $"Freedombone" \
--title $"Run an App" \
--radiolist $'Choose:' \
16 40 20 "$applist")
16 40 20 $applist)
# shellcheck disable=SC2181
if [ $? -eq 0 ]; then