Get the restore app name
This commit is contained in:
parent
d1de9d191b
commit
a1fcbfe42c
|
@ -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 {
|
||||||
|
|
||||||
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 {
|
||||||
fi
|
fi
|
||||||
|
|
||||||
clear
|
clear
|
||||||
|
echo $"Selected $app_name"
|
||||||
|
|
||||||
# Restore all
|
# Restore all
|
||||||
if [[ "$app_name" == "$AllStr" ]]; then
|
if [[ "$app_name" == "$AllStr" ]]; then
|
||||||
|
|
Loading…
Reference in New Issue