From d6f6a80d0979b2288d4b79f6975b087a188223c8 Mon Sep 17 00:00:00 2001 From: "Dr. Peter Poeml" Date: Fri, 14 Jul 2006 18:39:44 +0000 Subject: [PATCH] hacky support to allow setting by the environment variable BUILD_DIST, where BUILD_DIST equals - --- osc/commandline.py | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/osc/commandline.py b/osc/commandline.py index 8f722b3e..45edbeda 100755 --- a/osc/commandline.py +++ b/osc/commandline.py @@ -611,11 +611,22 @@ def build(args): """build: build a package _locally_ You need to call the command inside a package directory. -usage: osc build [--clean|--noinit] +usage: 1. osc build [--clean|--noinit] + 2. BUILD_DIST=... osc build [--clean|--noinit] + +where BUILD_DIST equals - """ - if args is None or len(args) < 3: + builddist = os.getenv('BUILD_DIST') + if builddist: + #sys.argv[4] = sys.argv[1] + hyphen = builddist.rfind('-') + sys.argv.insert(2, builddist[hyphen+1:]) + sys.argv.insert(2, builddist[:hyphen]) + print sys.argv + + elif args is None or len(args) < 3: print 'missing argument' print build.func_doc print 'Valid arguments are:'