Skip to content
Snippets Groups Projects
Commit a1fcbfe4 authored by Bob Mottram's avatar Bob Mottram
Browse files

Get the restore app name

parent d1de9d19
No related branches found
No related tags found
No related merge requests found
......@@ -912,23 +912,34 @@ function restore_data_from_storage {
while true
do
app_list=()
n=1
applist="$n $AllStr off"
n=$[n+1]
app_list+=("$AllStr")
util_index=0
for a in "${utils_installed[@]}"
do
applist="$applist $n $a off"
app_name=${utils_installed[util_index]}
n=$[n+1]
util_index=$[util_index+1]
app_list+=("$app_name")
done
app_index=0
for a in "${APPS_INSTALLED_NAMES[@]}"
do
applist="$applist $n $a off"
n=$[n+1]
app_name=${APPS_INSTALLED_NAMES[app_index]}
app_index=$[app_index+1]
app_list+=("$app_name")
done
applist="$applist $n $ExitStr on"
n=$[n+1]
app_list+=("$ExitStr")
choices=$(dialog --stdout --backtitle $"Freedombone" \
--title $"Restore apps" \
......@@ -937,10 +948,12 @@ function restore_data_from_storage {
sel=$?
case $sel in
1) break;;
255) break;;
1) return;;
255) return;;
esac
app_name=$(cat $data)
selected_index=$(cat $data)
selected_index=$[selected_index-1]
app_name=${app_list[$selected_index]}
# exit
if [[ "$app_name" == "$ExitStr" ]]; then
......@@ -948,6 +961,7 @@ function restore_data_from_storage {
fi
clear
echo $"Selected $app_name"
# Restore all
if [[ "$app_name" == "$AllStr" ]]; then
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment