2 # Nightly cron job to generate snapshot releases
4 versions
=/server
/httpd
/htdocs
/squid-cache.org
/content
/Versions
/
5 TMPDIR
=/home
/squidadm
/$LOGNAME.cron
7 if [ -d $TMPDIR ]; then
12 trap "cd /; chmod -R +w $TMPDIR; rm -rf $TMPDIR" 0
14 PATH
=/sbin
:/bin
:/usr
/sbin
:/usr
/bin
:/usr
/local
/bin
17 # Be nice to our friends. This is a batch job
18 renice
10 $$
>/dev
/null
29 dst
=$versions/$dir/$ver
30 out
=${6:-`basename $branch`}
31 $mksnap $branch $6 2>&1 |
grep -v "set owner/group"
32 for file in `cat $out.out` ; do
44 type=`echo $file | sed -e 's/.*\.tar\.gz/.tar.gz/' -e 's/.*\.tar\.bz2/.tar.bz2/' -e 's/.*\.patch/.patch/' -e 's/.*\.diff/.diff/' -e 's/.*-RELEASENOTES.html/-RELEASENOTES.html/' -e 's/^.*ChangeLog.txt$/-ChangeLog.txt/' -e 's/.*-cfgman/-cfgman/'`
50 md5
$file >$dst/$file.md5
51 cp -p $file $dst/$file
54 # update snapshot symlink
55 rm -f $dst/squid-
$ver.snapshot
$type
56 ln -s $file $dst/squid-
$ver.snapshot
$type
57 rm -f $dst/squid-
$ver.snapshot
$type.md5
58 ln -s $file.md5
$dst/squid-
$ver.snapshot
$type.md5
60 # cleanup old snapshots
61 ls $dst/*-[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]$type |
sed -e 's/.*-\([0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]'$type'\)/\1/' |
sort -r |
tail +$save |
while read f
; do
62 rm -f $dst/*-$f $dst/*-$f.md5
69 tar -C $dst/cfgman
-zxf $dst/$file
72 rm -f $dst/cfgman.html
73 ln -s $dst/$file $dst/cfgman.html
76 rm -f $dst/cfgman.html.gz
77 ln -s $dst/$file $dst/cfgman.html.gz
81 tar -C $dst/manuals
-zxf $dst/$file
87 if [ -x $dst/make.sh
]; then
95 # autotool derived files not kept in trunk, but still need to bootstrap for make dist
96 ..
/commit
/bootstrap squid-3
97 make_snapshot ..
/commit
/squid-
3/mksnapshot.sh trunk v3
3.HEAD
6
99 rm -f /server
/httpd
/htdocs
/squid-cache.org
/CONTRIBUTORS.new
100 cp ..
/commit
/squid-
3/CONTRIBUTORS
/server
/httpd
/htdocs
/squid-cache.org
/CONTRIBUTORS.new
101 chmod 444 /server
/httpd
/htdocs
/squid-cache.org
/CONTRIBUTORS.new
102 mv -f /server
/httpd
/htdocs
/squid-cache.org
/CONTRIBUTORS.new
/server
/httpd
/htdocs
/squid-cache.org
/content
/CONTRIBUTORS.txt
104 rm -f /server
/httpd
/htdocs
/squid-cache.org
/SPONSORS.new
105 cp ..
/commit
/squid-
3/SPONSORS
/server
/httpd
/htdocs
/squid-cache.org
/SPONSORS.new
106 chmod 444 /server
/httpd
/htdocs
/squid-cache.org
/SPONSORS.new
107 mv -f /server
/httpd
/htdocs
/squid-cache.org
/SPONSORS.new
/server
/httpd
/htdocs
/squid-cache.org
/content
/SPONSORS.txt
109 ..
/commit
/bootstrap squid-3.1
110 make_snapshot ..
/commit
/squid-
3/mksnapshot.sh branches
/SQUID_3_1 v3
3.1 3
112 #../commit/bootstrap squid-3.0
113 #make_snapshot ../commit/squid-3/mksnapshot.sh branches/SQUID_3_0 v3 3.0 3
115 ..
/commit
/bootstrap squid-2
116 make_snapshot ..
/commit
/squid-
2/mksnapshot.sh HEAD v2 HEAD
3
118 ..
/commit
/bootstrap squid-2.7
119 make_snapshot ..
/commit
/squid-2.7
/mksnapshot.sh SQUID_2_7 v2
2.7 3
121 #../commit/bootstrap squid-2.6
122 #make_snapshot ../commit/squid-2.6/mksnapshot.sh SQUID_2_6 v2 2.6 3
124 #../commit/bootstrap squid-2.5
125 #make_snapshot ../commit/squid-2.5/mksnapshot.sh SQUID_2_5 v2 2.5 3
127 #../commit/squid3-SQUID2.sync