Parcourir la source

Check that interactive configuration suceeded

Bob Mottram il y a 8 ans
Parent
révision
393022a97e
2 fichiers modifiés avec 16 ajouts et 0 suppressions
  1. 13
    0
      src/freedombone
  2. 3
    0
      src/freedombone-config

+ 13
- 0
src/freedombone Voir le fichier

@@ -83,7 +83,20 @@ if [[ $command_options == "menuconfig" ]]; then
83 83
             rm $COMPLETION_FILE
84 84
         fi
85 85
     fi
86
+
87
+    # clear the interactive file which indicates configuration success
88
+    interactive_file=$HOME/.${PROJECT_NAME}-interactive
89
+    if [ -f $interactive_file ]; then
90
+        rm $interactive_file
91
+    fi
92
+
86 93
     interactive_configuration
94
+
95
+    # check that the interactive file was created
96
+    if [ ! -f $interactive_file ]; then
97
+        exit 6393562
98
+    fi
99
+    rm $interactive_file
87 100
 else
88 101
     while [[ $# > 1 ]]
89 102
     do

+ 3
- 0
src/freedombone-config Voir le fichier

@@ -1362,6 +1362,9 @@ function interactive_config {
1362 1362
     if [ -f temp.cfg ]; then
1363 1363
         shred -zu temp.cfg
1364 1364
     fi
1365
+
1366
+    # This file indicates that the configuration happened successfully
1367
+    touch $HOME/.${PROJECT_NAME}-interactive
1365 1368
 }
1366 1369
 
1367 1370
 function show_result {