This repository has been archived on 2024-05-31. You can view files and clone it, but cannot push or open issues or pull requests.
idhub-docker/build__instance-autotest.sh

35 lines
577 B
Bash
Raw Normal View History

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