config: don't require .config.2 to save a sample
author"Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Sun Jul 31 00:04:02 2011 +0200 (2011-07-31)
changeset 2576af55c37bbd84
parent 2575 b0cc1bf3e851
child 2577 6fc224df66e8
config: don't require .config.2 to save a sample

Samples should contain kconfig-parsable definitions, not script variables.
.config.2 contains bash arrays, which is definitely not kconfig-safe...

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
scripts/saveSample.sh.in
     1.1 --- a/scripts/saveSample.sh.in	Sat Jul 30 00:05:53 2011 +0200
     1.2 +++ b/scripts/saveSample.sh.in	Sun Jul 31 00:04:02 2011 +0200
     1.3 @@ -22,10 +22,11 @@
     1.4  
     1.5  # Parse the configuration file
     1.6  # Don't use CT_TestOrAbort, it prints the test string to [DEBUG]
     1.7 -if [ ! -f .config.2 ]; then
     1.8 +# Note: we just need the non-mangled .config, not .config.2
     1.9 +if [ ! -f .config ]; then
    1.10      CT_Abort "Configuration file not found. Please create one."
    1.11  fi
    1.12 -. .config.2
    1.13 +. .config
    1.14  
    1.15  # We can not reliably save a sample which either uses local patches
    1.16  # and/or custom Linux kernel headers. Warn the user about this issue
    1.17 @@ -55,7 +56,7 @@
    1.18  
    1.19  # Kludge: if any of the config options needs either CT_TARGET or CT_TOP_DIR,
    1.20  # re-parse them:
    1.21 -. .config.2
    1.22 +. .config
    1.23  
    1.24  # Override log options
    1.25  unset CT_LOG_PROGRESS_BAR CT_LOG_ERROR CT_LOG_INFO CT_LOG_EXTRA CT_LOG_DEBUG LOG_ALL