scripts/functions: use portable 'gzip -dc'

'zcat' on MacOS-X is broken (it is not gzip's zcat, but compres' zcat).

Use 'gzip -dc' for portability, as suggested by Anthony.

Reported-by: Fernando Ortiz <fortiz2k@gmail.com>
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Cc: Anthony Foiani <anthony.foiani@gmail.com>
This commit is contained in:
Yann E. MORIN" 2013-11-15 21:16:52 +01:00
parent a5b6b0d129
commit 0226e35db7

View File

@ -1336,7 +1336,7 @@ CT_DoLoadState(){
CT_DoLog STATE " Restoring log file" CT_DoLog STATE " Restoring log file"
exec >/dev/null exec >/dev/null
case "${CT_DEBUG_CT_SAVE_STEPS_GZIP}" in case "${CT_DEBUG_CT_SAVE_STEPS_GZIP}" in
y) zcat "${state_dir}/log.gz" >"${tmp_log_file}";; y) gzip -dc "${state_dir}/log.gz" >"${tmp_log_file}";;
*) cat "${state_dir}/log" >"${tmp_log_file}";; *) cat "${state_dir}/log" >"${tmp_log_file}";;
esac esac
cat "${state_dir}/tail.log" >>"${tmp_log_file}" cat "${state_dir}/tail.log" >>"${tmp_log_file}"