diff options
author | Yann E. MORIN" <yann.morin.1998@anciens.enib.fr> | 2011-05-19 22:29:49 +0200 |
---|---|---|
committer | Yann E. MORIN" <yann.morin.1998@anciens.enib.fr> | 2011-05-19 22:29:49 +0200 |
commit | 2c3b6d2b71c3a9bcbef5157ec9eb4217b25cf685 (patch) | |
tree | f80f713a23dac9ce506ce7423b5a5206ed04755d /scripts/saveSample.sh.in | |
parent | c4bb88466eba7f25ab23f71859a8cff43b30f62c (diff) | |
download | crosstool-ng-2c3b6d2b71c3a9bcbef5157ec9eb4217b25cf685.tar.gz crosstool-ng-2c3b6d2b71c3a9bcbef5157ec9eb4217b25cf685.tar.bz2 crosstool-ng-2c3b6d2b71c3a9bcbef5157ec9eb4217b25cf685.zip |
scripts: munge .config to handle array variables
Transfrom array variables from pure strings (in the kconfig output)
into proper bash arrays declarations, for feeding to the build scripts.
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Signed-off-by: "Benoît THÉBAUDEAU" <benoit.thebaudeau@advansee.com>
Diffstat (limited to 'scripts/saveSample.sh.in')
-rw-r--r-- | scripts/saveSample.sh.in | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/scripts/saveSample.sh.in b/scripts/saveSample.sh.in index 2dfdf529..9e012aa3 100644 --- a/scripts/saveSample.sh.in +++ b/scripts/saveSample.sh.in @@ -22,10 +22,10 @@ rm -f "${tmp_log_file}" # Parse the configuration file # Don't use CT_TestOrAbort, it prints the test string to [DEBUG] -if [ ! -f .config ]; then +if [ ! -f .config.2 ]; then CT_Abort "Configuration file not found. Please create one." fi -. .config +. .config.2 # We can not reliably save a sample which either uses local patches # and/or custom Linux kernel headers. Warn the user about this issue @@ -55,7 +55,7 @@ CT_DoBuildTargetTuple # Kludge: if any of the config options needs either CT_TARGET or CT_TOP_DIR, # re-parse them: -. .config +. .config.2 # Override log options unset CT_LOG_PROGRESS_BAR CT_LOG_ERROR CT_LOG_INFO CT_LOG_EXTRA CT_LOG_DEBUG LOG_ALL @@ -72,6 +72,8 @@ samp_dir="samples/${samp_name}" mkdir -p "${samp_dir}" # Save the crosstool-NG config file +# We need to save the real .config with kconfig's values, +# not our mangled .config.2 with arrays "${sed}" -r -e 's|^(CT_PREFIX_DIR)=.*|\1="${HOME}/x-tools/${CT_TARGET}"|;' \ -e 's|^# CT_LOG_TO_FILE is not set$|CT_LOG_TO_FILE=y|;' \ -e 's|^# CT_LOG_FILE_COMPRESS is not set$|CT_LOG_FILE_COMPRESS=y|;' \ |