mirror of
https://github.com/crosstool-ng/crosstool-ng.git
synced 2025-06-16 22:38:16 +00:00
complibs: save directory with static complibs for stop/restart
This commit is contained in:
@ -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"
|
||||
|
Reference in New Issue
Block a user