#!/usr/bin/env bash

[[ $1 == force ]] && docker pull jakzal/php-intl:8.2-73.2
[[ ! -d /tmp/symfony/icu ]] && mkdir -p /tmp/symfony/icu

docker run \
    -it --rm --name symfony-intl \
    -u $(id -u):$(id -g) \
    -v /tmp/symfony/icu:/tmp \
    -v $(pwd):/symfony \
    -w /symfony \
    jakzal/php-intl:8.2-73.2 \
    php src/Symfony/Component/Intl/Resources/bin/update-data.php
