diff options
author | Yann E. MORIN" <yann.morin.1998@anciens.enib.fr> | 2010-04-11 15:37:53 +0200 |
---|---|---|
committer | Yann E. MORIN" <yann.morin.1998@anciens.enib.fr> | 2010-04-11 15:37:53 +0200 |
commit | 58de741ecff404b4448bdaa446c2bb6e7eb53b48 (patch) | |
tree | 1ee23fc5b65edccfb7843aefb28b908d9e9ffcc0 /scripts/functions | |
parent | a01284b0e2c0d624195b4251c50a5b7a6863a0f1 (diff) | |
download | crosstool-ng-58de741ecff404b4448bdaa446c2bb6e7eb53b48.tar.gz crosstool-ng-58de741ecff404b4448bdaa446c2bb6e7eb53b48.tar.bz2 crosstool-ng-58de741ecff404b4448bdaa446c2bb6e7eb53b48.zip |
complibs: save directory with static complibs for stop/restart
Diffstat (limited to 'scripts/functions')
-rw-r--r-- | scripts/functions | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/scripts/functions b/scripts/functions index 87a6bdb8..f39eeaf7 100644 --- a/scripts/functions +++ b/scripts/functions @@ -934,6 +934,13 @@ CT_DoSaveState() { /^(UID|EUID)=/d; /^(FUNCNAME|GROUPS|PPID|SHELLOPTS)=/d;' >"${state_dir}/env.sh" + if [ "${CT_COMPLIBS_SHARED}" != "y" ]; then + CT_DoLog DEBUG " Saving CT_COMPLIBS_DIR='${CT_COMPLIBS_DIR}'" + CT_Pushd "${CT_COMPLIBS_DIR}" + CT_DoExecLog DEBUG tar cv${tar_opt}f "${state_dir}/complibs_dir.tar${tar_ext}" . + CT_Popd + fi + CT_DoLog DEBUG " Saving CT_CONFIG_DIR='${CT_CONFIG_DIR}'" CT_Pushd "${CT_CONFIG_DIR}" CT_DoExecLog DEBUG tar cv${tar_opt}f "${state_dir}/config_dir.tar${tar_ext}" . @@ -1012,6 +1019,13 @@ CT_DoLoadState(){ CT_DoExecLog DEBUG tar xv${tar_opt}f "${state_dir}/config_dir.tar${tar_ext}" CT_Popd + if [ "${CT_COMPLIBS_SHARED}" != "y" ]; then + CT_DoLog DEBUG " Restoring CT_COMPLIBS_DIR='${CT_COMPLIBS_DIR}'" + CT_Pushd "${CT_COMPLIBS_DIR}" + CT_DoExecLog DEBUG tar xv${tar_opt}f "${state_dir}/complibs_dir.tar${tar_ext}" + CT_Popd + fi + # Restore the environment, discarding any error message # (for example, read-only bash internals) CT_DoLog DEBUG " Restoring environment" |