Skip to content

Commit

Permalink
Update build-deb to make correct use of DOCKER_BUILD_PKGS
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
mlaventure committed May 2, 2016
1 parent 2f6e3b0 commit 20e1b95
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 3 deletions.
5 changes: 4 additions & 1 deletion hack/make/build-deb
Original file line number Diff line number Diff line change
Expand Up @@ -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; }
Expand Down
5 changes: 4 additions & 1 deletion hack/make/build-rpm
Original file line number Diff line number Diff line change
Expand Up @@ -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; }
Expand Down
5 changes: 4 additions & 1 deletion hack/make/test-deb-install
Original file line number Diff line number Diff line change
Expand Up @@ -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; }
Expand Down

0 comments on commit 20e1b95

Please sign in to comment.