Skip to content

Commit

Permalink
optimize test.sh save
Browse files Browse the repository at this point in the history
  • Loading branch information
nathanielc committed Feb 5, 2016
1 parent c2c9ada commit c2ca687
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,10 @@ function save_docker_image {
mkdir -p "$DOCKER_SAVE_DIR"
fi

if [[ -e "$imagefile" ]]
# Check if we already have a docker image
exists=$(docker images "$imagename")
# If not exists and we have a save, load it.
if [[ -z "$exists" && -e "$imagefile" ]]
then
zcat $imagefile | docker load
fi
Expand Down

0 comments on commit c2ca687

Please sign in to comment.