Skip to content
Snippets Groups Projects
Commit 709404e9 authored by Bob Mottram's avatar Bob Mottram
Browse files

Don't add apps which have no variants defined

parent 07a60e5f
No related branches found
No related tags found
No related merge requests found
......@@ -96,12 +96,17 @@ function web_admin_create_add_apps {
if [ ! $app_is_installed ]; then
app_filename="/usr/share/${PROJECT_NAME}/apps/${PROJECT_NAME}-app-${app_name}"
if [ -f "$app_filename" ]; then
if grep -q "VARIANTS=''" "$app_filename"; then
continue
fi
if grep -q 'VARIANTS=""' "$app_filename"; then
continue
fi
# get the icon for the app
icon_filename="/usr/share/${PROJECT_NAME}/android-app/${app_name}.png"
if [ -f "$icon_filename" ]; then
cp "$icon_filename" "$webadmin_install_dir/icons/${app_name}.png"
else
icon_filename=
continue
fi
......
......@@ -244,6 +244,12 @@ function web_admin_create_add_apps {
if [ ! $app_is_installed ]; then
app_filename="/usr/share/${PROJECT_NAME}/apps/${PROJECT_NAME}-app-${app_name}"
if [ -f "$app_filename" ]; then
if grep -q "VARIANTS=''" "$app_filename"; then
continue
fi
if grep -q 'VARIANTS=""' "$app_filename"; then
continue
fi
# get the icon for the app
icon_filename="/usr/share/${PROJECT_NAME}/android-app/${app_name}.png"
if [ -f "$icon_filename" ]; then
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment