From 024da4cc607e15f096ec396034dae7056a7642a1 Mon Sep 17 00:00:00 2001 From: mirocow Date: Thu, 17 Mar 2016 17:50:20 +0400 Subject: [PATCH] Don`t delete source file --- restore.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/restore.sh b/restore.sh index c2f0300..862b73d 100755 --- a/restore.sh +++ b/restore.sh @@ -109,7 +109,7 @@ restore() if [ -f "$DIR/$BDD/$TABLE.txt" ]; then rm $DIR/$BDD/$TABLE.txt fi - bunzip2 $DIR/$BDD/$TABLE.txt.bz2 + bunzip2 -k $DIR/$BDD/$TABLE.txt.bz2 fi if [ -f "$DIR/$BDD/$TABLE.txt" ]; then @@ -130,9 +130,9 @@ restore() fi done - if [ ! -f "$DIR/$BDD/$TABLE.txt.bz2" ]; then - f_log "> $TABLE" - bzip2 $DIR/$BDD/$TABLE.txt + if [ -f "$DIR/$BDD/$TABLE.txt.bz2" ]; then + f_log "Delete source: $TABLE.txt" + rm $DIR/$BDD/$TABLE.txt fi fi