浏览代码

Keep platforms together

Bob Mottram 6 年前
父节点
当前提交
62e6afd6b5
共有 1 个文件被更改,包括 10 次插入11 次删除
  1. 10
    11
      src/freedombone-utils-android

+ 10
- 11
src/freedombone-utils-android 查看文件

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