Fix #54, keen an old copy of gzipped tweets until it's replaced

This commit is contained in:
Kai Hendry
2015-10-25 18:12:07 +08:00
parent 968c4a9e47
commit 62f0a110fd

View File

@@ -26,7 +26,7 @@ fi
page=1 page=1
saved=0 saved=0
test -s "$1.txt.gz" && gunzip "$1.txt.gz" test -s "$1.txt.gz" && gunzip < "$1.txt.gz" > "$1.txt"
if test -s "$1.txt" if test -s "$1.txt"
then then
@@ -65,5 +65,5 @@ done
echo "$1" saved "$saved" tweets echo "$1" saved "$saved" tweets
test -L "$1.txt.gz" && rm "$1.txt.gz" test -L "$1.txt.gz" && rm "$1.txt.gz"
gzip -v "$1.txt" gzip -f "$1.txt"
ln -sfv "$1.txt.gz" tweets.txt ln -sfv "$1.txt.gz" tweets.txt