1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00

Update build-deb to make correct use of DOCKER_BUILD_PKGS

An environment variable cannot directly be used as a bash array, this
patch loops through all the IFS separated value (which default to
space) instead.

Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
This commit is contained in:
Kenfe-Mickael Laventure 2016-04-28 16:35:21 -07:00
parent 2f6e3b0ba0
commit 20e1b9593e
3 changed files with 12 additions and 3 deletions

View file

@ -41,7 +41,10 @@ set -e
builderDir="contrib/builder/deb/${PACKAGE_ARCH}"
pkgs=( $(find "${builderDir}/"*/ -type d) )
if [ ! -z "$DOCKER_BUILD_PKGS" ]; then
pkgs=( $(echo ${DOCKER_BUILD_PKGS[@]/#/$builderDir\/}) )
pkgs=()
for p in $DOCKER_BUILD_PKGS; do
pkgs+=( "$builderDir/$p" )
done
fi
for dir in "${pkgs[@]}"; do
[ -d "$dir" ] || { echo >&2 "skipping nonexistent $dir"; continue; }

View file

@ -71,7 +71,10 @@ set -e
builderDir="contrib/builder/rpm/${PACKAGE_ARCH}"
pkgs=( $(find "${builderDir}/"*/ -type d) )
if [ ! -z "$DOCKER_BUILD_PKGS" ]; then
pkgs=( $(echo ${DOCKER_BUILD_PKGS[@]/#/$builderDir\/}) )
pkgs=()
for p in $DOCKER_BUILD_PKGS; do
pkgs+=( "$builderDir/$p" )
done
fi
for dir in "${pkgs[@]}"; do
[ -d "$dir" ] || { echo >&2 "skipping nonexistent $dir"; continue; }

View file

@ -16,7 +16,10 @@ test_deb_install(){
builderDir="contrib/builder/deb/${PACKAGE_ARCH}"
pkgs=( $(find "${builderDir}/"*/ -type d) )
if [ ! -z "$DOCKER_BUILD_PKGS" ]; then
pkgs=( $(echo ${DOCKER_BUILD_PKGS[@]/#/$builderDir\/}) )
pkgs=()
for p in $DOCKER_BUILD_PKGS; do
pkgs+=( "$builderDir/$p" )
done
fi
for dir in "${pkgs[@]}"; do
[ -d "$dir" ] || { echo >&2 "skipping nonexistent $dir"; continue; }