Browse Source

Keep platforms together

Bob Mottram 6 years ago
parent
commit
62e6afd6b5
1 changed files with 10 additions and 11 deletions
  1. 10
    11
      src/freedombone-utils-android

+ 10
- 11
src/freedombone-utils-android View File

95
                       echo '            {';
95
                       echo '            {';
96
                       echo '              "type": "web",';
96
                       echo '              "type": "web",';
97
                       echo "              \"url\": \"$domain_name\"";
97
                       echo "              \"url\": \"$domain_name\"";
98
-                      echo '            }';
99
-                      echo '          ]';
100
-                      echo -n '        }'; } >> "$plinth_api"
98
+                      echo -n '            }'; } >> "$plinth_api"
101
                 fi
99
                 fi
102
 
100
 
103
                 if [ "$MOBILE_APP_URL" ]; then
101
                 if [ "$MOBILE_APP_URL" ]; then
104
                     if [[ "$domain_name" != "0" && "$app_name" != 'matrix' ]]; then
102
                     if [[ "$domain_name" != "0" && "$app_name" != 'matrix' ]]; then
105
                         echo ',' >> "$plinth_api"
103
                         echo ',' >> "$plinth_api"
104
+                    else
105
+                        { echo '        {';
106
+                          echo "          \"name\": \"${app_name}\",";
107
+                          echo "          \"platforms\": ["; } >> "$plinth_api"
106
                     fi
108
                     fi
107
-                    { echo '        {';
108
-                      echo "          \"name\": \"${app_name}\",";
109
-                      echo "          \"platforms\": [";
110
-                      echo '            {';
109
+                    { echo '            {';
111
                       echo '              "type": "store",';
110
                       echo '              "type": "store",';
112
                       echo '              "os": "android",';
111
                       echo '              "os": "android",';
113
                       echo '              "store_name": "f-droid",';
112
                       echo '              "store_name": "f-droid",';
114
                       echo "              \"url\": \"$MOBILE_APP_URL\"";
113
                       echo "              \"url\": \"$MOBILE_APP_URL\"";
115
-                      echo '            }';
116
-                      echo '          ]';
117
-                      echo -n '        }'; } >> "$plinth_api"
114
+                      echo '            }'; } >> "$plinth_api"
118
                 else
115
                 else
119
                     echo '' >> "$plinth_api"
116
                     echo '' >> "$plinth_api"
120
                 fi
117
                 fi
121
 
118
 
122
-                { echo '      ]';
119
+                { echo '          ]';
120
+                  echo '        }';
121
+                  echo '      ]';
123
                   echo -n '    }'; } >> "$plinth_api"
122
                   echo -n '    }'; } >> "$plinth_api"
124
 
123
 
125
                 android_ctr=$((android_ctr+1))
124
                 android_ctr=$((android_ctr+1))