fix gzip switch

This commit is contained in:
Antoine Beaupré 2008-10-21 23:46:39 +00:00
parent 74cec77279
commit 63c198ac6a
1 changed files with 5 additions and 3 deletions

View File

@ -245,10 +245,12 @@ function dobck() {
if [ "$DO_BACKUP" == "YES" ]; then
command="mysqldump --defaults-file=/etc/alternc/my.cnf --add-drop-table --allow-keywords --quote-names --force --quick --add-locks --lock-tables --extended-insert $db"
if [ "$compressed" -eq 1 ] ; then
$command = "$command | gzip -c"
debug "$command > ${target_dir}/${name_backup_file}.sql${ext}"
$command | gzip -c > "${target_dir}/${name_backup_file}.sql${ext}"
else
debug "$command > ${target_dir}/${name_backup_file}.sql${ext}"
$command > "${target_dir}/${name_backup_file}.sql${ext}"
fi
debug "$command > ${target_dir}/${name_backup_file}.sql${ext}"
$command > "${target_dir}/${name_backup_file}.sql${ext}"
fi
IFS=" "