view utils/docker-entrypoint.sh @ 111:7d781c057956 feature/djs-DEP-12-docker

flow: Closed <feature> 'djs-DEP-12-docker'.
author smith@nwoca.org
date Mon, 24 Apr 2017 15:25:09 +0100
parents b997ad087ac1
children
line wrap: on
line source
#!/bin/bash
set -e

if [ "$1" = 'update' ]; then
  mkdir -p $SSDT_HOME
  cd $SSDT_HOME
  if [ ! -d ".hg" ]; then
      echo "cloning repository $SSDT_DOCKER  to $SSDT_HOME"
      hg init
  fi
  branch=${2:-production}
  echo "pulling updates from $SSDT_DOCKER ($branch)"
  hg pull -y $SSDT_DOCKER
  hg revert -a
  hg update $branch

else

  exec "$@"

fi