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 { ...@@ -912,23 +912,34 @@ function restore_data_from_storage {
while true while true
do do
app_list=()
n=1 n=1
applist="$n $AllStr off" applist="$n $AllStr off"
n=$[n+1] n=$[n+1]
app_list+=("$AllStr")
util_index=0
for a in "${utils_installed[@]}" for a in "${utils_installed[@]}"
do do
applist="$applist $n $a off" applist="$applist $n $a off"
app_name=${utils_installed[util_index]}
n=$[n+1] n=$[n+1]
util_index=$[util_index+1]
app_list+=("$app_name")
done done
app_index=0
for a in "${APPS_INSTALLED_NAMES[@]}" for a in "${APPS_INSTALLED_NAMES[@]}"
do do
applist="$applist $n $a off" applist="$applist $n $a off"
n=$[n+1] n=$[n+1]
app_name=${APPS_INSTALLED_NAMES[app_index]}
app_index=$[app_index+1]
app_list+=("$app_name")
done done
applist="$applist $n $ExitStr on" applist="$applist $n $ExitStr on"
n=$[n+1] n=$[n+1]
app_list+=("$ExitStr")
choices=$(dialog --stdout --backtitle $"Freedombone" \ choices=$(dialog --stdout --backtitle $"Freedombone" \
--title $"Restore apps" \ --title $"Restore apps" \
...@@ -937,10 +948,12 @@ function restore_data_from_storage { ...@@ -937,10 +948,12 @@ function restore_data_from_storage {
sel=$? sel=$?
case $sel in case $sel in
1) break;; 1) return;;
255) break;; 255) return;;
esac esac
app_name=$(cat $data) selected_index=$(cat $data)
selected_index=$[selected_index-1]
app_name=${app_list[$selected_index]}
# exit # exit
if [[ "$app_name" == "$ExitStr" ]]; then if [[ "$app_name" == "$ExitStr" ]]; then
...@@ -948,6 +961,7 @@ function restore_data_from_storage { ...@@ -948,6 +961,7 @@ function restore_data_from_storage {
fi fi
clear clear
echo $"Selected $app_name"
# Restore all # Restore all
if [[ "$app_name" == "$AllStr" ]]; then 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