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.
2024-01-25 14:13:08 +00:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
set -e
|
|
|
|
set -u
|
|
|
|
# DEBUG
|
|
|
|
set -x
|
|
|
|
|
|
|
|
main() {
|
2024-02-02 13:36:30 +00:00
|
|
|
cd "$(dirname "${0}")"
|
|
|
|
|
2024-01-25 14:13:08 +00:00
|
|
|
# includes functions:
|
|
|
|
# common_start
|
|
|
|
# common_end
|
|
|
|
. ./build__common.sh
|
|
|
|
|
2024-02-05 18:18:57 +00:00
|
|
|
target='instance-autotest'
|
|
|
|
|
2024-02-05 19:48:20 +00:00
|
|
|
idhub="idhub__${target}"
|
2024-01-25 14:13:08 +00:00
|
|
|
|
|
|
|
common_start
|
|
|
|
|
2024-02-05 18:37:35 +00:00
|
|
|
# no data persistence: cleanup previous possible data
|
2024-02-05 19:48:20 +00:00
|
|
|
rm -rf "./${idhub}"
|
2024-02-05 18:37:35 +00:00
|
|
|
|
2024-01-25 14:13:08 +00:00
|
|
|
# detect if is new
|
2024-02-05 19:48:20 +00:00
|
|
|
if [ ! -f "./${idhub}" ]; then
|
2024-01-25 14:13:08 +00:00
|
|
|
echo 'Detected new deployment, recreating idhub git repo'
|
2024-02-05 19:48:20 +00:00
|
|
|
cp -rp IdHub "${idhub}"
|
|
|
|
rm -f "${idhub}/db.sqlite3"
|
2024-01-25 14:13:08 +00:00
|
|
|
fi
|
|
|
|
|
|
|
|
common_end
|
|
|
|
}
|
|
|
|
|
|
|
|
main "${@}"
|