Parcourir la source

Check that all chosen apps actually do get installed

Bob Mottram il y a 8 ans
Parent
révision
d925c4f00d
3 fichiers modifiés avec 15 ajouts et 0 suppressions
  1. 4
    0
      src/freedombone-addremove
  2. 4
    0
      src/freedombone-utils-selector
  3. 7
    0
      src/freedombone-utils-setup

+ 4
- 0
src/freedombone-addremove Voir le fichier

@@ -174,6 +174,10 @@ function install_apps_selected {
174 174
     # install the apps
175 175
     read_configuration
176 176
     install_apps interactive
177
+    if [ ! $APP_INSTALLED_SUCCESS ]; then
178
+        echo $'One or more apps failed to install'
179
+        exit 357223
180
+    fi
177 181
 }
178 182
 
179 183
 if [[ $1 == "test"* ]]; then

+ 4
- 0
src/freedombone-utils-selector Voir le fichier

@@ -426,6 +426,8 @@ function install_apps_interactive {
426 426
 function install_apps {
427 427
     is_interactive=$1
428 428
 
429
+    APP_INSTALLED_SUCCESS=1
430
+
429 431
     # interactive install configuration for each app
430 432
     if [ ${is_interactive} ]; then
431 433
         install_apps_interactive
@@ -461,6 +463,7 @@ function install_apps {
461 463
                             install_completed ${a}
462 464
                             echo $"${a} was installed from interactive"
463 465
                         else
466
+                            APP_INSTALLED_SUCCESS=
464 467
                             echo $"${a} was not installed from interactive"
465 468
                         fi
466 469
                     fi
@@ -485,6 +488,7 @@ function install_apps {
485 488
                                 install_completed ${a}
486 489
                                 echo $"${a} was installed"
487 490
                             else
491
+                                APP_INSTALLED_SUCCESS=
488 492
                                 echo $"${a} was not installed"
489 493
                             fi
490 494
                         fi

+ 7
- 0
src/freedombone-utils-setup Voir le fichier

@@ -545,11 +545,18 @@ function setup_apps {
545 545
 
546 546
     if [[ $is_interactive == "menuconfig"* ]]; then
547 547
         ${PROJECT_NAME}-addremove add-all
548
+        if [ ! "$?" = "0" ]; then
549
+            exit 72524
550
+        fi
548 551
     fi
549 552
 
550 553
     if [[ $is_interactive == "noninteractive" || $is_interactive == "headless" ]]; then
551 554
         function_check install_apps
552 555
         install_apps
556
+        if [ ! $APP_INSTALLED_SUCCESS ]; then
557
+            echo $'One or more apps failed to install'
558
+            exit 368224
559
+        fi
553 560
     fi
554 561
 }
555 562