#!/bin/bash

# Run this script from the root of the repository

set -e

if [[ -z "$VIRTUAL_ENV" ]]; then
    echo "You need to activate your virtual env before running this script"
    exit 1
fi

source_file=${1:-./src/openapi.yaml}
manage=${MANAGE:-src/manage.py}

python $manage patch_error_contenttypes $source_file
