summaryrefslogtreecommitdiff
path: root/tcwg-cleanup-stale-containers.sh
diff options
context:
space:
mode:
authorMaxim Kuvyrkov <maxim.kuvyrkov@linaro.org>2016-11-08 12:27:56 +0000
committerMaxim Kuvyrkov <maxim.kuvyrkov@linaro.org>2016-11-08 12:27:56 +0000
commit561a1475dacfc36314cde01d18b6208c4845ff9c (patch)
treeef4f48f96f8fb40e879bd3eab1821ff5fd10aaeb /tcwg-cleanup-stale-containers.sh
parent2acff61e04382bf8c8cc2a06bafd48ed5577a72a (diff)
tcwg-cleanup-stale-containers: Fix bug
Change-Id: I086487f4e33e5ba0e9b02e973827a8363bb0fa1e
Diffstat (limited to 'tcwg-cleanup-stale-containers.sh')
-rwxr-xr-xtcwg-cleanup-stale-containers.sh2
1 files changed, 1 insertions, 1 deletions
diff --git a/tcwg-cleanup-stale-containers.sh b/tcwg-cleanup-stale-containers.sh
index 5b3b36ca..523001e3 100755
--- a/tcwg-cleanup-stale-containers.sh
+++ b/tcwg-cleanup-stale-containers.sh
@@ -32,7 +32,7 @@ docker ps $docker_ps_opts
rm_containers=()
for container in $(docker ps --format "{{.ID}} {{.RunningFor}}" $docker_ps_opts | grep "hour" | cut -d" " -f 1); do
- if [ "$(docker ps --format "{{.ID}} {{.RunningFor}}" $docker_ps_opts | grep "$container:" | cut -d" " -f 2)" -gt "$hours" ]; then
+ if [ "$(docker ps --format "{{.ID}} {{.RunningFor}}" $docker_ps_opts | grep "$container" | cut -d" " -f 2)" -gt "$hours" ]; then
rm_containers=("${rm_containers[@]}" $container)
fi
done