From: Elan Ruusamäe Date: Tue, 29 Jan 2008 13:48:30 +0000 (+0000) Subject: - make output-config optional (defaults to input-config) X-Git-Tag: auto/th/kernel-vanilla-2_6_24_2-0_3~6 X-Git-Url: http://git.pld-linux.org/?a=commitdiff_plain;h=83c9dd8d6a847f6c381e31c12364e101df8f653c;p=packages%2Fkernel.git - make output-config optional (defaults to input-config) - allow inline symbols (for current arch) Changed files: kernel-config.py -> 1.10 --- diff --git a/kernel-config.py b/kernel-config.py index d731e23f..f15f6e98 100644 --- a/kernel-config.py +++ b/kernel-config.py @@ -6,14 +6,18 @@ import sys import re -if len(sys.argv) != 5: - print "Usage: %s target_arch kernel.conf input-config output-config" % sys.argv[0] +argc = len(sys.argv) +if argc < 4 or argc > 5: + print "Usage: %s target_arch kernel.conf input-config [output-config]" % sys.argv[0] sys.exit(1) arch = sys.argv[1] kernelconfig = sys.argv[2] inconfig = sys.argv[3] -outconfig = sys.argv[4] +if argc == 5: + outconfig = sys.argv[4] +else: + outconfig = inconfig from UserDict import UserDict @@ -94,6 +98,12 @@ for l in f: rc = 1 continue + # inline symbols: for current arch, duplicates allowed + if symbol.find('=') >= 0: + (symbol, value) = symbol.split('=') + dict[symbol] = value + continue + hash = {} for item in c[1:]: try: