summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Schroeder <mls@suse.de>2014-04-22 14:23:19 +0200
committerMichael Schroeder <mls@suse.de>2014-04-22 14:23:19 +0200
commit8f6f826cd9c939343e10c3522df6059f7abb792c (patch)
tree487f56d7257d9970983bbffb80ee685156d8e3a0
parent3245ae762ed660f6b1091169c72553115e577f85 (diff)
improve bintype guessing in init_buildsystem
-rwxr-xr-xinit_buildsystem8
1 files changed, 8 insertions, 0 deletions
diff --git a/init_buildsystem b/init_buildsystem
index adf513d..13170c9 100755
--- a/init_buildsystem
+++ b/init_buildsystem
@@ -282,6 +282,14 @@ create_cache_file() {
BINTYPE=`queryconfig binarytype --dist "$BUILD_DIST" --configdir "$CONFIG_DIR" --archpath "$BUILD_ARCH"`
test "$BINTYPE" = UNDEFINED && BINTYPE=
fi
+ if test -z "$BINTYPE" ; then
+ # check the first init_buildsystem arg, maybe it is a recipe
+ case ${PKGS[0]} in
+ *.spec) BINTYPE=rpm ;;
+ *.dsc) BINTYPE=deb ;;
+ */PKGBUILD|PKGBUILD) BINTYPE=arch ;;
+ esac
+ fi
for SRC in "${repos[@]}" -- ${BUILD_RPMS//:/ /}; do
if test "$SRC" = '--' ; then
findonly=1