Mercurial > public > ssdt-docker
comparison utils/docker-entrypoint.sh @ 90:63cb9be89a26 production v1.0.0
flow: Merged <release> 'v1.0.0' to <master> ('production').
author | smith@nwoca.org |
---|---|
date | Thu, 22 Sep 2016 01:49:20 +0100 |
parents | b997ad087ac1 |
children |
comparison
equal
deleted
inserted
replaced
1:44f401c902ba | 90:63cb9be89a26 |
---|---|
1 #!/bin/bash | |
2 set -e | |
3 | |
4 if [ "$1" = 'update' ]; then | |
5 mkdir -p $SSDT_HOME | |
6 cd $SSDT_HOME | |
7 if [ ! -d ".hg" ]; then | |
8 echo "cloning repository $SSDT_DOCKER to $SSDT_HOME" | |
9 hg init | |
10 fi | |
11 branch=${2:-production} | |
12 echo "pulling updates from $SSDT_DOCKER ($branch)" | |
13 hg pull -y $SSDT_DOCKER | |
14 hg revert -a | |
15 hg update $branch | |
16 | |
17 else | |
18 | |
19 exec "$@" | |
20 | |
21 fi |