#!/bin/sh set -e set -u # DEBUG set -x main() { cd "$(dirname "${0}")" # includes functions: # common_start # common_end . ./build__common.sh target='instance-autotest' idhub="idhub__${target}" common_start # no data persistence: cleanup previous possible data rm -rf "./${idhub}" # detect if is new if [ ! -f "./${idhub}" ]; then echo 'Detected new deployment, recreating idhub git repo' cp -rp IdHub "${idhub}" rm -f "${idhub}/db.sqlite3" fi common_end } main "${@}"