Selecting apps

This commit is contained in:
Bob Mottram 2016-11-19 16:12:03 +00:00
parent ebf91c686d
commit 2df98832c9
1 changed files with 5 additions and 8 deletions

View File

@ -144,21 +144,18 @@ function passwords_select_user {
function passwords_show_apps {
SELECTED_APP=
select_all_apps=$1
applist=""
n=1
app_index=0
i=0
W=()
for a in "${APPS_AVAILABLE[@]}"
do
applist="$applist $n $a off"
n=$[n+1]
app_index=$[app_index+1]
i=$((i+1))
W+=($i "$a")
done
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)
if [ $? -eq 0 ]; then
SELECTED_APP="${name[$((selected_app_index-1))]}"
SELECTED_APP="${APPS_INSTALLED_NAMES[$((selected_app_index-1))]}"
fi
}