--- mitgcm.org/scripts/daily_snapshot 2008/02/29 01:51:27 1.2 +++ mitgcm.org/scripts/daily_snapshot 2008/03/05 00:56:11 1.3 @@ -1,6 +1,6 @@ #! /usr/bin/env bash -# $Header: /home/ubuntu/mnt/e9_copy/mitgcm.org/scripts/Attic/daily_snapshot,v 1.2 2008/02/29 01:51:27 jmc Exp $ +# $Header: /home/ubuntu/mnt/e9_copy/mitgcm.org/scripts/Attic/daily_snapshot,v 1.3 2008/03/05 00:56:11 jmc Exp $ # download or update several dir. which are used for: # - front_page building @@ -13,7 +13,6 @@ echo -n 'Update dir:' cd /u/u2/jmc/testing/scripts && pwd && cvs -q update -P -d - #-- update tools/mpack-1.6 dir : tmpFil=/tmp/TTT.daily_snapshot.$$ exe=munpack @@ -31,6 +30,16 @@ echo -n 'Update dir:' cd /u/u2/jmc/testing/front_content && pwd && cvs -q update -P -d +#-- clean-up old log files: +cd /u/u2/jmc/testing/logs +n=$(( `ls bld_manual.* | wc -l` - 10 )) +if test $n -gt 0 ; then + echo -n ' remove files: ' + ls -lt bld_manual.* | tail -"$n" + ls -t bld_manual.* | tail -"$n" | xargs rm -f +fi + + umask 0002 echo 'Changing directory to /u/httpd/html/download/daily_snapshot'