view utils/docker-entrypoint.sh @ 82:b2deadc0cf17

USPSR-2298 Update usps db image to ssdt-postgres:3
author Matt Calmes <calmes@nwoca.org>
date Thu, 25 Aug 2016 16:19:15 +0100
parents 541766977a11
children b997ad087ac1
line wrap: on
line source
#!/bin/bash
set -e

if [ "$1" = 'update' ]; then
  cd $SSDT_HOME
  if [ ! -d ".hg" ]; then
      echo "cloning repository $SSDT_DOCKER  to $SSDT_HOME"
      mkdir -p $SSDT_HOME
      hg init
  fi
  echo "pulling updates"
  hg pull -y $SSDT_DOCKER
  hg revert -a
  hg update default

else

  exec "$@"

fi