Keep platforms together

This commit is contained in:
Bob Mottram 2018-05-25 19:44:26 +01:00
parent 8f58083d22
commit 62e6afd6b5
1 changed files with 10 additions and 11 deletions

View File

@ -95,31 +95,30 @@ function android_update_apps {
echo ' {'; echo ' {';
echo ' "type": "web",'; echo ' "type": "web",';
echo " \"url\": \"$domain_name\""; echo " \"url\": \"$domain_name\"";
echo ' }';
echo ' ]';
echo -n ' }'; } >> "$plinth_api" echo -n ' }'; } >> "$plinth_api"
fi fi
if [ "$MOBILE_APP_URL" ]; then if [ "$MOBILE_APP_URL" ]; then
if [[ "$domain_name" != "0" && "$app_name" != 'matrix' ]]; then if [[ "$domain_name" != "0" && "$app_name" != 'matrix' ]]; then
echo ',' >> "$plinth_api" echo ',' >> "$plinth_api"
fi else
{ echo ' {'; { echo ' {';
echo " \"name\": \"${app_name}\","; echo " \"name\": \"${app_name}\",";
echo " \"platforms\": ["; echo " \"platforms\": ["; } >> "$plinth_api"
echo ' {'; fi
{ echo ' {';
echo ' "type": "store",'; echo ' "type": "store",';
echo ' "os": "android",'; echo ' "os": "android",';
echo ' "store_name": "f-droid",'; echo ' "store_name": "f-droid",';
echo " \"url\": \"$MOBILE_APP_URL\""; echo " \"url\": \"$MOBILE_APP_URL\"";
echo ' }'; echo ' }'; } >> "$plinth_api"
echo ' ]';
echo -n ' }'; } >> "$plinth_api"
else else
echo '' >> "$plinth_api" echo '' >> "$plinth_api"
fi fi
{ echo ' ]'; { echo ' ]';
echo ' }';
echo ' ]';
echo -n ' }'; } >> "$plinth_api" echo -n ' }'; } >> "$plinth_api"
android_ctr=$((android_ctr+1)) android_ctr=$((android_ctr+1))