2020-05-25 11:42:00 +02:00
|
|
|
#!/usr/local/bin/zsh
|
2020-09-18 14:53:58 +02:00
|
|
|
export NVM_DIR="$HOME/.nvm"
|
|
|
|
source "$NVM_DIR/nvm.sh"
|
2021-02-20 19:44:33 +01:00
|
|
|
for site in mainnet liquid testnet bisq signet
|
2020-05-25 11:42:00 +02:00
|
|
|
do
|
|
|
|
git clone https://github.com/mempool/mempool "${HOME}/${site}"
|
2020-05-25 13:58:46 +02:00
|
|
|
mkdir -p "${HOME}/public_html/${site}/"
|
2020-07-24 18:45:30 +02:00
|
|
|
|
2020-05-25 11:42:00 +02:00
|
|
|
cd "${HOME}/${site}/backend/"
|
|
|
|
cp "../production/mempool-config.${site}.json" "mempool-config.json"
|
2020-07-24 18:45:30 +02:00
|
|
|
|
2020-10-25 20:24:05 +01:00
|
|
|
npm install
|
2020-05-25 11:42:00 +02:00
|
|
|
npm run build
|
2020-07-24 18:45:30 +02:00
|
|
|
|
|
|
|
if [ "${site}" = "mainnet" ]
|
|
|
|
then
|
|
|
|
cd "${HOME}/${site}/frontend/"
|
2020-10-25 20:24:05 +01:00
|
|
|
npm install
|
2020-07-24 18:45:30 +02:00
|
|
|
npm run build
|
2020-12-21 23:09:45 +01:00
|
|
|
rsync -av ./dist/mempool/browser/* "${HOME}/public_html/${site}/"
|
2020-07-24 18:45:30 +02:00
|
|
|
fi
|
2020-05-25 11:42:00 +02:00
|
|
|
done
|