# /bin/sh

# Build the acmedns
echo "Building ACMEDNS"
cd ../tools/provider_config_updater/
./update.sh
cd ../../

# Remove the lego to prevent go compiler stuck in loading file in this folder
rm -rf ../tools/provider_config_updater/lego

# Copy the generated acmedns to code base
cp ./tools/provider_config_updater/acmedns/acmedns.go ./mod/acme/acmedns/acmedns.go
cp ./tools/provider_config_updater/acmedns/providers.json ./mod/acme/acmedns/providers.json