some fix in validate script

This commit is contained in:
Mario Voigt 2021-12-02 18:12:25 +01:00
parent aecbd00c1e
commit e2496806a0

View File

@ -45,7 +45,6 @@ for GALLERY_EXTENSION in ${GALLERY_EXTENSIONS}; do
EXTENSION=$(echo ${AGGLOMERATED_JSON} | jq -r '.[]|select(.inkscape_gallery_url=="'$GALLERY_EXTENSION'")|{name}|.[]') EXTENSION=$(echo ${AGGLOMERATED_JSON} | jq -r '.[]|select(.inkscape_gallery_url=="'$GALLERY_EXTENSION'")|{name}|.[]')
done done
echo "--> Count of inx files:" echo "--> Count of inx files:"
INX=$(find ./ -type f -name "*.inx" | wc -l) INX=$(find ./ -type f -name "*.inx" | wc -l)
echo INX: $INX echo INX: $INX
@ -76,14 +75,15 @@ if [[ $REPLY =~ ^[Yy]$ ]]; then
for EXTENSION in */; do for EXTENSION in */; do
EXTENSION="${EXTENSION%/}" #strip trailing slash EXTENSION="${EXTENSION%/}" #strip trailing slash
EXTRA="" EXTRA=""
if [[ $EXTENSION == "styles_to_layers" ]] || [[ $EXTENSION == "ungrouper_and_element_migrator_filter" ]] || [[ $EXTENSION == "epilog_dashboard_bbox_adjust" ]]; then DEPS=$(jq -r 'try .[]|.dependent_extensions|.[]' ${EXTENSION}/meta.json)
EXTRA="${EXTRA} apply_transformations/" DEPS=$(echo $DEPS|tr -d '\n')
elif [[ $EXTENSION == "styles_to_layers" ]] || [[ $EXTENSION == "ungrouper_and_element_migrator_filter" ]]; then #if dependencies are not empty, then ...
EXTRA="${EXTRA} remove_empty_groups/" if [[ ! -z $DEPS ]]; then
EXTRA="$DEPS"
fi fi
ZIPFILE=$TARGETDIR/$EXTENSION.zip ZIPFILE=$TARGETDIR/$EXTENSION.zip
zip -ru $ZIPFILE $EXTENSION/ 000_about_fablabchemnitz.svg $EXTRA > /dev/null 2>&1
echo "--> creating/updating $ZIPFILE" echo "--> creating/updating $ZIPFILE"
zip -ru $ZIPFILE $EXTENSION/ 000_about_fablabchemnitz.svg $EXTRA > /dev/null 2>&1
done done
fi fi
@ -100,14 +100,15 @@ if [[ $REPLY =~ ^[Yy]$ ]]; then
for GALLERY_EXTENSION in ${GALLERY_EXTENSIONS}; do for GALLERY_EXTENSION in ${GALLERY_EXTENSIONS}; do
EXTENSION="$(echo ${AGGLOMERATED_JSON} | jq -r '.[]|select(.inkscape_gallery_url=="'$GALLERY_EXTENSION'")|{path}|.[]')" EXTENSION="$(echo ${AGGLOMERATED_JSON} | jq -r '.[]|select(.inkscape_gallery_url=="'$GALLERY_EXTENSION'")|{path}|.[]')"
EXTRA="" EXTRA=""
if [[ $EXTENSION == "styles_to_layers" ]] || [[ $EXTENSION == "ungrouper_and_element_migrator_filter" ]] || [[ $EXTENSION == "epilog_dashboard_bbox_adjust" ]]; then DEPS=$(jq -r 'try .[]|.dependent_extensions|.[]' ${EXTENSION}/meta.json)
EXTRA="${EXTRA} apply_transformations/" DEPS=$(echo $DEPS|tr -d '\n')
elif [[ $EXTENSION == "styles_to_layers" ]] || [[ $EXTENSION == "ungrouper_and_element_migrator_filter" ]]; then #if dependencies are not empty, then ...
EXTRA="${EXTRA} remove_empty_groups/" if [[ ! -z $DEPS ]]; then
EXTRA="$DEPS"
fi fi
ZIPFILE=$TARGETDIR/$EXTENSION.zip ZIPFILE=$TARGETDIR/$EXTENSION.zip
rm $ZIPFILE > /dev/null 2>&1 rm $ZIPFILE > /dev/null 2>&1
echo "--> creating $ZIPFILE" echo "--> creating/updating $ZIPFILE"
zip -ru $ZIPFILE $EXTENSION/ 000_about_fablabchemnitz.svg $EXTRA zip -ru $ZIPFILE $EXTENSION/ 000_about_fablabchemnitz.svg $EXTRA > /dev/null 2>&1
done done
fi fi