Bob Mottram 8 年前
父节点
当前提交
5460671a09
共有 1 个文件被更改,包括 6 次插入4 次删除
  1. 6
    4
      src/freedombone-controlpanel

+ 6
- 4
src/freedombone-controlpanel 查看文件

866
 function restore_data_from_storage {
866
 function restore_data_from_storage {
867
     restore_type="$1"
867
     restore_type="$1"
868
 
868
 
869
+    AllStr=$"all"
870
+    ExitStr=$"Exit"
871
+
869
     if [[ $restore_type != "local" ]]; then
872
     if [[ $restore_type != "local" ]]; then
870
         restore_command="${PROJECT_NAME}-restore-remote $remote_domain_name configuration;;"
873
         restore_command="${PROJECT_NAME}-restore-remote $remote_domain_name configuration;;"
871
     else
874
     else
910
     do
913
     do
911
 
914
 
912
         app_list=()
915
         app_list=()
913
-        AllStr=$"all"
914
         n=1
916
         n=1
915
         applist="$n $AllStr off"
917
         applist="$n $AllStr off"
916
         n=$[n+1]
918
         n=$[n+1]
934
             app_index=$[app_index+1]
936
             app_index=$[app_index+1]
935
             app_list+=("$app_name")
937
             app_list+=("$app_name")
936
         done
938
         done
937
-        ExitStr=$"Exit"
938
         applist="$applist $n $ExitStr on"
939
         applist="$applist $n $ExitStr on"
939
         n=$[n+1]
940
         n=$[n+1]
940
 
941
 
951
         app_name=$(cat $data)
952
         app_name=$(cat $data)
952
 
953
 
953
         # exit
954
         # exit
954
-        if [[ $app_name == "$ExitStr" ]]; then
955
+        if [[ "$app_name" == "$ExitStr" ]]; then
955
             break
956
             break
956
         fi
957
         fi
957
 
958
 
958
         clear
959
         clear
960
+        echo $"Selected $app_name"
959
 
961
 
960
         # Restore all
962
         # Restore all
961
-        if [[ $app_name == "$AllStr" ]]; then
963
+        if [[ "$app_name" == "$AllStr" ]]; then
962
             $restore_command
964
             $restore_command
963
             retcode="$?"
965
             retcode="$?"
964
             if [[ "$retcode" != "0" ]]; then
966
             if [[ "$retcode" != "0" ]]; then