diff options
Diffstat (limited to 'start-container-docker.sh')
-rwxr-xr-x | start-container-docker.sh | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/start-container-docker.sh b/start-container-docker.sh index bc3f6145..f306c34e 100755 --- a/start-container-docker.sh +++ b/start-container-docker.sh @@ -217,8 +217,8 @@ image=linaro/ci-${container_arch}-tcwg-build-ubuntu:${distro} stamp_dir=/home/shared/docker if ! [ -d "$stamp_dir" ]; then - sudo mkdir -p "$stamp_dir" - sudo chmod 0777 "$stamp_dir" + sudo mkdir -p "$stamp_dir" || mkdir -p "$stamp_dir" + sudo chmod 0777 "$stamp_dir" || chmod 0777 "$stamp_dir" fi # We use two stamp files per image: @@ -237,8 +237,8 @@ pull_image=false # that any change to master docker images will be deployed within a day. pull_if_older_than=$(($(date +%s) - 1*24*60*60)) # Use negative comparison to handle non-existent stamp files. -if ! [ "$(stat -c %Z "$image_stamp.pull" 2>/dev/null)" \ - -gt $pull_if_older_than ]; then +if ! [ "$(stat -c %Z "$image_stamp.pull")" \ + -gt $pull_if_older_than ] 2>/dev/null; then pull_image=true fi @@ -403,7 +403,7 @@ if $ssh_info; then fi # Update the time of image use, so that we don't remove the image in -# tcwg-cleanup-stale-containers . +# tcwg-cleanup-stale-containers. rm -f "$image_stamp.use" touch "$image_stamp.use" |