Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
Comment: | Clean up SCM backup script - Since this is now a more generic SCM backup script, remove references to Subversion - Use default variables where applicable - Use multi-line invocation of find(1) command for added readability and configurability |
---|---|
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA1: | 1b4ad584284fc30f0610680912d0f6cecafd084c |
User & Date: | cfuhrman 2017-01-30 18:57:20 |
Context
2017-01-30
| ||
18:59 | Remove outdated SCM header information Since this script is now managed by fossil[1], remove SVN/Git identification information. Footnotes: [1] http://fossil-scm.org Leaf check-in: 58c1277f5d user: cfuhrman tags: trunk | |
18:57 | Clean up SCM backup script - Since this is now a more generic SCM backup script, remove references to Subversion - Use default variables where applicable - Use multi-line invocation of find(1) command for added readability and configurability check-in: 1b4ad58428 user: cfuhrman tags: trunk | |
2016-06-08
| ||
04:49 | Bump MAKE_JOBS, USERLAND_COUNT check-in: bd7f58caad user: cfuhrman tags: trunk | |
Changes
Changes to scm/scm_backup_clean.sh.
1
2
3
4
5
6
7
8
9
10
11
12
..
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
|
#!/usr/bin/env bash # ==================================================================== # # Id: d60c51bc9694765d3a62d08a7c9a1a1acdab13c9 # $Id$ # # Cleans up directories older than x days # # If given without arguments, the current directory will be used. # Caveat emptor! # # Usage: ................................................................................ # # directory - directory to check (default current directory) # age - [default: 14 days] maximum age in days before # directory is removed # DIRECTORY=$1 MAX_AGE_DAYS=$2 # If age isn't defined, then set it to a default value if [ ! ${MAX_AGE_DAYS} ]; then MAX_AGE_DAYS=14 fi # Clean up subversion backup directories older than 2 weeks find $1 -maxdepth 1 -type d -mtime +${MAX_AGE_DAYS} -exec rm -rf {} \; # Ende |
>
>
>
<
|
|
|
|
|
|
|
|
|
|
|
<
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
..
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
|
#!/usr/bin/env bash # ==================================================================== # # $Id: scm_backup_clean.sh 1232 2012-03-16 17:41:15Z cfuhrman $ # # Based on adBrite ops repo: # Id: d60c51bc9694765d3a62d08a7c9a1a1acdab13c9 # # Cleans up directories older than x days # # If given without arguments, the current directory will be used. # Caveat emptor! # # Usage: ................................................................................ # # directory - directory to check (default current directory) # age - [default: 14 days] maximum age in days before # directory is removed # DIRECTORY=$1 DEFAULT_MAX_AGE_DAYS=14 MAX_AGE_DAYS=${2:-$DEFAULT_MAX_AGE_DAYS} # Clean up SCM backup directories find ${DIRECTORY} \ -maxdepth 1 \ -type d \ -mtime +${MAX_AGE_DAYS} \ -exec rm -rf {} \; # Ende |