#! /bin/bash

set -o pipefail
set -e

if ! which firebase; then
   echo curl -sL https://firebase.tools | upgrade=true bash
fi

outdir=./deploy

rm -rf $outdir
mkdir -p $outdir/public
cp ./json-resume/out/resume.*.html $outdir/public/index.html
cp ./json-resume/out/resume.*.pdf $outdir/public/BreeLaPointeResume.pdf

firebase login
echo firebase init
firebase deploy || (
   firebase logout
   firebase login
   firebase deploy
)
