move the log if a new one exists
authorkeybuk <keybuk@c2f067bf-98e0-425f-9c98-e76020cfa380>
Wed, 6 Oct 2004 17:18:55 +0000 (17:18 +0000)
committerkeybuk <keybuk@c2f067bf-98e0-425f-9c98-e76020cfa380>
Wed, 6 Oct 2004 17:18:55 +0000 (17:18 +0000)
git-svn-id: svn+ssh://svn.debian.org/svn/planet-debian/trunk@8 c2f067bf-98e0-425f-9c98-e76020cfa380

cron/30log

index 8a10450..147b5a6 100755 (executable)
@@ -2,6 +2,8 @@
 
 cd /org/planet.debian.org/log
 
-rm -f planet.log.0
-mv -f planet.log planet.log.0
-mv new-planet.log planet.log
+if [ -f new-planet.log ]; then
+       rm -f planet.log.0
+       [ -f planet.log ] && mv planet.log planet.log.0
+       mv new-planet.log planet.log
+fi