sh if lint

Signed-off-by: Thomas Sjögren <konstruktoid@users.noreply.github.com>
This commit is contained in:
Thomas Sjögren 2017-01-27 10:59:57 +01:00
parent c36649362b
commit 7fc5dc33a7

View file

@ -240,9 +240,7 @@ else
fail=0
for c in $containers; do
docker inspect --format '{{ .Config.Memory }}' "$c" 2> /dev/null 1>&2
if [ "$?" -eq 0 ]; then
if docker inspect --format '{{ .Config.Memory }}' "$c" 2> /dev/null 1>&2; then
memory=$(docker inspect --format '{{ .Config.Memory }}' "$c")
else
memory=$(docker inspect --format '{{ .HostConfig.Memory }}' "$c")
@ -269,9 +267,7 @@ else
fail=0
for c in $containers; do
docker inspect --format '{{ .Config.CpuShares }}' "$c" 2> /dev/null 1>&2
if [ "$?" -eq 0 ]; then
if docker inspect --format '{{ .Config.CpuShares }}' "$c" 2> /dev/null 1>&2; then
shares=$(docker inspect --format '{{ .Config.CpuShares }}' "$c")
else
shares=$(docker inspect --format '{{ .HostConfig.CpuShares }}' "$c")