#!/bin/sh

set -e

export HOME=$(mktemp -d)
trap "rm -rf '$HOME'" EXIT

amass --help

amass enum -d megacorpone.com

if [ ! -e $HOME/.config/amass/assetdb.db ]; then
    echo "No database was created"
    exit 1
fi

rm -rf $HOME

exit $?
