Skip to content

Commit

Permalink
Use bash4 associative array syntax in build script
Browse files Browse the repository at this point in the history
  • Loading branch information
webknjaz committed Jul 15, 2017
1 parent 8bd03b0 commit 51a5646
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions tools/run_docker.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,17 @@ fi

manylinux1_image_prefix="quay.io/pypa/manylinux1_"
dock_ext_args=""
declare -A docker_pull_pids=() # This syntax requires at least bash v4

for arch in x86_64 i686
do
docker pull "${manylinux1_image_prefix}${arch}" &
export docker_pull_pid_${arch}=$!
docker_pull_pids[$arch]=$!
done

for arch in x86_64 i686
do
arch_pull_pid=$(eval echo \$docker_pull_pid_${arch})
arch_pull_pid=${docker_pull_pids[$arch]}
echo Waiting for docker pull PID $arch_pull_pid to complete downloading container for $arch arch...
wait $arch_pull_pid # await for docker image for current arch to be pulled from hub
[ $arch == "i686" ] && dock_ext_args="linux32"
Expand Down

0 comments on commit 51a5646

Please sign in to comment.