Skip to content

Commit

Permalink
select the correct recipe when the build type is known
Browse files Browse the repository at this point in the history
  • Loading branch information
mlschroe committed Dec 8, 2014
1 parent 259c5cc commit 34ecc6b
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions build-recipe
Expand Up @@ -94,7 +94,7 @@ recipe_set_buildtype() {

# expands all directories into files
expand_recipe_directories() {
local f t ff found
local f t ff found types
if test -z "$RECIPEFILES" ; then
set -- "`pwd`"
else
Expand All @@ -106,7 +106,18 @@ expand_recipe_directories() {
f="`pwd`/$f"
fi
if test -d "$f" ; then
for t in .spec .dsc PKGBUILD .kiwi .src.rpm .nosrc.rpm ; do
if test -z "$types" ; then
if test -n "$BUILD_DIST" ; then
case $(queryconfig --dist "$BUILD_DIST" --configdir "$CONFIG_DIR" --archpath "$BUILD_ARCH" type) in
dsc) types=".dsc" ;;
kiwi) types=".kiwi" ;;
arch) types="PKGBUILD" ;;
livebuild) types=".livebuild" ;;
esac
fi
types="$types .spec .dsc PKGBUILD .kiwi .src.rpm .nosrc.rpm"
fi
for t in $types ; do
found=
for ff in "$f"/*$t ; do
test -f "$ff" || continue
Expand Down

0 comments on commit 34ecc6b

Please sign in to comment.