This change introduces a new check for other allowed files, as long
as its name is defined in ALLOWED_FILES_WILDCARDS. For instance, with
this change, README can now be README.txt, README.md, README.rst, etc.
Change-Id: Ia9a0bfb455b08fd5a8a924508f5611de57754454
Signed-off-by: garciadeblas <gerardo.garciadeblas@telefonica.com>
# Other files allowed in the descriptor base directory
ALLOWED_FILES=(README)
+ALLOWED_FILES_WILDCARDS=(README)
DESC_TYPES=(vnfd nsd)
DESC_EXTN=(yml yaml json xml)
for f in ${files[@]}; do
if [ $(contains "${ALLOWED_FILES[@]}" $f) == "n" ]; then
- echo "WARN: Unsupported file $f found"
+ for j in ${ALLOWED_FILES_WILDCARDS[@]}; do
+ if [[ $f != *"$j"* ]]; then
+ echo "WARN: Unsupported file $f found"
+ fi
+ done
fi
done