32 lines
655 B
Bash
32 lines
655 B
Bash
|
#!/bin/sh
|
||
|
|
||
|
set -e
|
||
|
set -u
|
||
|
# DEBUG
|
||
|
set -x
|
||
|
|
||
|
# a wallet and verifier idhub for pilot-pangea
|
||
|
main() {
|
||
|
# includes functions:
|
||
|
# common_start
|
||
|
# common_end
|
||
|
. ./build__common.sh
|
||
|
|
||
|
pilot='pilot-pangea'
|
||
|
|
||
|
common_start
|
||
|
|
||
|
# detect if is new
|
||
|
if [ ! -f "./${idhub1}" ] && [ ! -f "./${idhub2}" ]; then
|
||
|
echo 'Detected new deployment, recreating git repos idhub1 and idhub2'
|
||
|
cp -rp IdHub "${idhub1}"
|
||
|
rm -f "${idhub1}/db.sqlite3"
|
||
|
cp -rp IdHub "${idhub2}"
|
||
|
rm -f "${idhub2}/db.sqlite3"
|
||
|
fi
|
||
|
|
||
|
common_end
|
||
|
}
|
||
|
|
||
|
main "${@}"
|