comparison utils/docker-entrypoint.sh @ 86:b997ad087ac1

DEP-12: modify utils image to pull production branch from ssdt-docker by default
author smith@nwoca.org
date Thu, 22 Sep 2016 01:48:13 +0100
parents 541766977a11
children
comparison
equal deleted inserted replaced
83:5fae3adac2af 86:b997ad087ac1
1 #!/bin/bash 1 #!/bin/bash
2 set -e 2 set -e
3 3
4 if [ "$1" = 'update' ]; then 4 if [ "$1" = 'update' ]; then
5 mkdir -p $SSDT_HOME
5 cd $SSDT_HOME 6 cd $SSDT_HOME
6 if [ ! -d ".hg" ]; then 7 if [ ! -d ".hg" ]; then
7 echo "cloning repository $SSDT_DOCKER to $SSDT_HOME" 8 echo "cloning repository $SSDT_DOCKER to $SSDT_HOME"
8 mkdir -p $SSDT_HOME
9 hg init 9 hg init
10 fi 10 fi
11 echo "pulling updates" 11 branch=${2:-production}
12 echo "pulling updates from $SSDT_DOCKER ($branch)"
12 hg pull -y $SSDT_DOCKER 13 hg pull -y $SSDT_DOCKER
13 hg revert -a 14 hg revert -a
14 hg update default 15 hg update $branch
15 16
16 else 17 else
17 18
18 exec "$@" 19 exec "$@"
19 20