diff options
author | Yann E. MORIN" <yann.morin.1998@anciens.enib.fr> | 2007-08-12 08:43:56 +0000 |
---|---|---|
committer | Yann E. MORIN" <yann.morin.1998@anciens.enib.fr> | 2007-08-12 08:43:56 +0000 |
commit | 7ee3cc8bc9ba31b7cac40f4480508eba5dbec075 (patch) | |
tree | 73450c3301dfd356350fb02ac5dbed43d44d3d0a /scripts/functions | |
parent | 0a0d8d6ba858230c464e829e7a0e4bfeeb1aa075 (diff) | |
download | crosstool-ng-7ee3cc8bc9ba31b7cac40f4480508eba5dbec075.tar.gz crosstool-ng-7ee3cc8bc9ba31b7cac40f4480508eba5dbec075.tar.bz2 crosstool-ng-7ee3cc8bc9ba31b7cac40f4480508eba5dbec075.zip |
Fix saving the environment. Thanks to Mark Vels <Mark.Vels@fundem.net> for pointed it out!
Diffstat (limited to 'scripts/functions')
-rw-r--r-- | scripts/functions | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/scripts/functions b/scripts/functions index 7c441327..16636337 100644 --- a/scripts/functions +++ b/scripts/functions @@ -552,14 +552,12 @@ CT_DoSaveState() { CT_DoLog DEBUG " Saving environment and aliases" # We must omit shell functions - # 'isgrep' is here because I don't seem to - # be able to remove the functions names. set |awk ' BEGIN { _p = 1; } - $0~/^[^ ] ()/ { _p = 0; } + $0~/^[^ ]+ \(\)/ { _p = 0; } _p == 1 $0 == "}" { _p = 1; } - ' |egrep -v '^[^ ]+ \(\)' >"${state_dir}/env.sh" + ' >"${state_dir}/env.sh" CT_DoLog DEBUG " Saving CT_CC_CORE_STATIC_PREFIX_DIR=\"${CT_CC_CORE_STATIC_PREFIX_DIR}\"" CT_Pushd "${CT_CC_CORE_STATIC_PREFIX_DIR}" |