[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Savannah-cvs] administration/infra/bin log-accum-cleaner.sh
From: |
Elfyn McBratney |
Subject: |
[Savannah-cvs] administration/infra/bin log-accum-cleaner.sh |
Date: |
Sat, 04 Sep 2004 10:30:57 -0400 |
CVSROOT: /cvsroot/administration
Module name: administration
Branch:
Changes by: Elfyn McBratney <address@hidden> 04/09/04 14:25:59
Modified files:
infra/bin : log-accum-cleaner.sh
Log message:
step back.
CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/administration/administration/infra/bin/log-accum-cleaner.sh.diff?tr1=1.4&tr2=1.5&r1=text&r2=text
Patches:
Index: administration/infra/bin/log-accum-cleaner.sh
diff -u administration/infra/bin/log-accum-cleaner.sh:1.4
administration/infra/bin/log-accum-cleaner.sh:1.5
--- administration/infra/bin/log-accum-cleaner.sh:1.4 Sat Sep 4 14:21:38 2004
+++ administration/infra/bin/log-accum-cleaner.sh Sat Sep 4 14:25:59 2004
@@ -1,9 +1,9 @@
#!/bin/sh
# -*- sh -*-
#
-# Script to clean a chroot's /var/run/log_accum.
+# Script to clean the chroot's /var/run/log_accum dirs.
#
-# $Id: log-accum-cleaner.sh,v 1.4 2004/09/04 14:21:38 beu Exp $
+# $Id: log-accum-cleaner.sh,v 1.5 2004/09/04 14:25:59 beu Exp $
# The basename of this script
prog=`basename $0`
@@ -20,8 +20,10 @@
# Project directory
projdir=$1; shift
+ # If `$projdir/tmp' doesn't exist, return now
+ test ! -d $projdir/var/run/log_accum && return 0
+
# Remove cruft
- echo removing cruft in $projdir/var/run/log_accum
find $projdir/var/run/log_accum -type f -atime +1 -print |xargs rm -f
}