Mercurial > public > ssdt-docker
annotate scripts/updates-pull.sh @ 190:c3587159637f
DEP-12: fix if expression
author | smith@nwoca.org |
---|---|
date | Wed, 20 Sep 2017 17:41:25 +0100 |
parents | 018f62da1931 |
children | fea886ba7279 |
rev | line source |
---|---|
54 | 1 #!/bin/bash |
49 | 2 # |
3 # Pulls updates from upstream repository for images matching filter. The | |
4 # default filter pulls all ssdt application images. | |
5 # | |
6 # Usage: | |
7 # pull-updates.sh [application] [filter] | |
8 # | |
9 # defaults: | |
10 # application=all applications | |
11 # filter=label=io.ssdt.app[=application] | |
12 # | |
13 # Note: if filter is provided, the first argument is ignored. A complete filter must be supplied. | |
14 # | |
15 APP=${1:+=$1} | |
16 FILTER=${2:-label=io.ssdt.app$APP} | |
17 while read -a line | |
18 do | |
19 repo=${line[0]} | |
20 tag=${line[1]} | |
157
018f62da1931
DEP-12: add docker version. prevent pulling updates for dangling images
smith@nwoca.org
parents:
54
diff
changeset
|
21 if [[ $repo == docker.ssdt.io* && $tag != *none* ]] |
49 | 22 then |
23 echo "docker pull ${repo}:${tag}" | |
24 docker pull ${repo}:${tag} | |
25 fi | |
26 done < <(docker images --filter "$FILTER") |