#!/usr/bin/env bash
echo "Validating $REPO_NAME..."
aws --region $AWS_REGION ecr describe-repositories --repository-names $REPO_NAME > /dev/null 2>&1
if [[ $? -ne 0 ]]; then
    echo "Repository doesn't exist! creating it..."
    aws --region $AWS_REGION ecr create-repository --repository-name $REPO_NAME
fi
