#!/bin/bash

CURRENTUSER=$(id -u -n)

if [ "$CURRENTUSER" != "www-data" ]; then
    echo "Not the right user"
    exit 1
fi

./../vendor/bin/xsd2php convert ./config_extended.yml ./../src/schema/FACTUR-X_EXTENDED.xsd -vvv
./../vendor/bin/xsd2php convert ./config_en16931.yml ./../src/schema/FACTUR-X_EN16931.xsd -vvv
./../vendor/bin/xsd2php convert ./config_basic.yml ./../src/schema/FACTUR-X_BASIC.xsd -vvv
./../vendor/bin/xsd2php convert ./config_basic_wl.yml ./../src/schema/FACTUR-X_BASIC-WL.xsd -vvv
./../vendor/bin/xsd2php convert ./config_minimum.yml ./../src/schema/FACTUR-X_MINIMUM.xsd -vvv
