#!/bin/sh

if [ ! -f esi_swagger.json ]; then
    curl "https://esi.tech.ccp.is/latest/swagger.json?datasource=tranquility" > esi_swagger.json
fi

if [ ! -f swagger_linux_amd64 ]; then
    wget https://github.com/go-swagger/go-swagger/releases/download/0.8.0/swagger_linux_amd64
    chmod +x swagger_linux_amd64
fi

./swagger_linux_amd64 generate client -f esi_swagger.json -A app
