#!/bin/bash
pushd local
  echo -e "BUILD\t: refreshing bilara-data"
  if [ -e bilara-data ]; then
    pushd bilara-data
    git pull
    popd
  else
    git clone https://github.com/suttacentral/bilara-data
  fi
  pushd bilara-data
    git checkout unpublished
  popd

  echo -e "BUILD\t: refreshing suid-map"
  rm -f suid-map.json
  ../scripts/js/search.js root of suffering -op | wc

popd

sudo docker build -t sc-voice/scv-bilara -f Dockerfile .
