/[adm]/puppet/modules/draklive/files/clean-live.sh
ViewVC logotype

Contents of /puppet/modules/draklive/files/clean-live.sh

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2086 - (show annotations) (download) (as text)
Wed Nov 9 22:36:29 2011 UTC (12 years, 5 months ago) by blino
File MIME type: application/x-sh
File size: 509 byte(s)
clean empty draklive dirs
1 #!/bin/bash
2
3 # clean old draklive build sets
4 DRAKLIVE_ROOT=/var/lib/draklive
5 RM="rm -rf"
6
7 # keep only chroot/build sets from previous day
8 MAX_BUILD_AGE=1
9 find $DRAKLIVE_ROOT/{chroot/*,build/*/*} -maxdepth 0 -not -name dist -mtime +$(expr $MAX_BUILD_AGE - 1) -exec $RM {} \;
10
11 # keep dist (iso + lists) for all sets during 20 days
12 MAX_DIST_AGE=20
13 find $DRAKLIVE_ROOT/build/*/dist -maxdepth 0 -mtime +$(expr $MAX_DIST_AGE - 1) -exec $RM {} \;
14
15 find /var/lib/draklive/build -maxdepth 1 -links 2 -exec rmdir {} \;

Properties

Name Value
svn:eol-style native
svn:executable *

  ViewVC Help
Powered by ViewVC 1.1.30