Browse Source

Try apps list first

Bob Mottram 8 years ago
parent
commit
006e58e1de
1 changed files with 8 additions and 7 deletions
  1. 8
    7
      src/freedombone-utils-selector

+ 8
- 7
src/freedombone-utils-selector View File

@@ -59,13 +59,9 @@ function item_in_array {
59 59
 
60 60
 function app_is_installed {
61 61
     app_name="$1"
62
-    if [ ! -f $COMPLETION_FILE ]; then
63
-        echo "0"
64
-        return
65
-    fi
66
-
67
-    if [ -f /usr/share/${PROJECT_NAME}/installed.txt ]; then
68
-        if ! grep -Fxq "install_${app_name}" /usr/share/${PROJECT_NAME}/installed.txt; then
62
+    INSTALLED_APPS_LIST=/usr/share/${PROJECT_NAME}/installed.txt
63
+    if [ -f $INSTALLED_APPS_LIST ]; then
64
+        if ! grep -Fxq "install_${app_name}" $INSTALLED_APPS_LIST; then
69 65
             echo "0"
70 66
         else
71 67
             echo "1"
@@ -73,6 +69,11 @@ function app_is_installed {
73 69
         return
74 70
     fi
75 71
 
72
+    if [ ! -f $COMPLETION_FILE ]; then
73
+        echo "0"
74
+        return
75
+    fi
76
+
76 77
     if ! grep -Fxq "install_${app_name}" $COMPLETION_FILE; then
77 78
         echo "0"
78 79
     else