diff --git a/scripts/create_addon b/scripts/create_addon index 89131d1e40..31ba1332fe 100755 --- a/scripts/create_addon +++ b/scripts/create_addon @@ -31,13 +31,8 @@ if [ -n "$PKG_ARCH" -a ! "$PKG_ARCH" = "any" ]; then fi if [ -n "$PKG_ADDON_PROJECTS" -a ! "$PKG_ADDON_PROJECTS" = "any" ]; then - for _PROJECT in $PKG_ADDON_PROJECTS ; do - if [ "$_PROJECT" = "$PROJECT" ] ; then - PROJECT_SUPPORTED="yes" - fi - done - if [ ! "$PROJECT_SUPPORTED" = "yes" ] ; then - echo "*** ERROR: $PKG_ADDON_ID: '$PROJECT' not supported ***" + if ! listcontains "${PKG_ADDON_PROJECTS}" "${DEVICE:-${PROJECT}}"; then + echo "*** ERROR: $PKG_ADDON_ID: '${DEVICE:-${PROJECT}}' not supported ***" exit 0 fi fi