|
@@ -50,18 +50,18 @@ function android_update_apps {
|
50
|
50
|
app_name=${APPS_INSTALLED_NAMES[$app_index]}
|
51
|
51
|
app_filename="/usr/share/${PROJECT_NAME}/apps/${PROJECT_NAME}-app-${app_name}"
|
52
|
52
|
if [ -f "$app_filename" ]; then
|
53
|
|
- if [ $android_ctr -gt 0 ]; then
|
54
|
|
- echo ',' >> "$plinth_api"
|
55
|
|
- fi
|
56
|
53
|
app_name_upper=$(echo "$app_name" | awk '{print toupper($0)}')
|
57
|
54
|
"${app_name_upper}_SHORT_DESCRIPTION"=
|
58
|
55
|
"${app_name_upper}_DESCRIPTION"=
|
59
|
56
|
"${app_name_upper}_ICON_URL"=
|
60
|
57
|
"${app_name_upper}_MOBILE_APP_URL"=
|
61
|
|
- if grep -q "${app_name_upper}_SHORT_DESCRIPTION=" "$app_filename"; then
|
62
|
|
- # shellcheck disable=SC2140
|
63
|
|
- "${app_name_upper}_SHORT_DESCRIPTION"="$(grep "${app_name_upper}_SHORT_DESCRIPTION=" "$app_filename" | head -n 1 | awk -F '=' '{print $2}')"
|
|
58
|
+
|
|
59
|
+ if ! grep -q "${app_name_upper}_SHORT_DESCRIPTION=" "$app_filename"; then
|
|
60
|
+ continue
|
64
|
61
|
fi
|
|
62
|
+ # shellcheck disable=SC2140
|
|
63
|
+ "${app_name_upper}_SHORT_DESCRIPTION"="$(grep "${app_name_upper}_SHORT_DESCRIPTION=" "$app_filename" | head -n 1 | awk -F '=' '{print $2}')"
|
|
64
|
+
|
65
|
65
|
if grep -q "${app_name_upper}_DESCRIPTION=" "$app_filename"; then
|
66
|
66
|
# shellcheck disable=SC2140
|
67
|
67
|
"${app_name_upper}_DESCRIPTION"="$(grep "${app_name_upper}_DESCRIPTION=" "$app_filename" | head -n 1 | awk -F '=' '{print $2}')"
|
|
@@ -75,6 +75,10 @@ function android_update_apps {
|
75
|
75
|
"${app_name_upper}_MOBILE_APP_URL"="$(grep "${app_name_upper}_MOBILE_APP_URL=" "$app_filename" | head -n 1 | awk -F '=' '{print $2}')"
|
76
|
76
|
fi
|
77
|
77
|
|
|
78
|
+ if [ $android_ctr -gt 0 ]; then
|
|
79
|
+ echo ',' >> "$plinth_api"
|
|
80
|
+ fi
|
|
81
|
+
|
78
|
82
|
{ echo ' {';
|
79
|
83
|
echo " \"name\": \"${app_name}\",";
|
80
|
84
|
echo " \"short_description\": \"$((${app_name_upper}_SHORT_DESCRIPTION))\",";
|