2 # Nightly cron job to generate snapshot releases
4 versions
=/server
/httpd
/htdocs
/squid-cache.org
/Versions
/
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
=${5:-`basename $tag`}
31 $mksnap $tag $out 2>&1 |
grep -v "set owner/group"
32 for file in `cat $tag.out` ; do
38 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/'`
44 md5
$file >$dst/$file.md5
45 cp -p $file $dst/$file
48 # update snapshot symlink
49 rm -f $dst/squid-
$ver.snapshot
$type
50 ln -s $file $dst/squid-
$ver.snapshot
$type
51 rm -f $dst/squid-
$ver.snapshot
$type.md5
52 ln -s $file $dst/squid-
$ver.snapshot
$type.md5
54 # cleanup old snapshots
55 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
56 rm -f $dst/*-$f $dst/*-$f.md5
63 tar -C $dst/cfgman
-zxf $dst/$file
66 rm -f $dst/cfgman.html
67 ln -s $dst/$file $dst/cfgman.html
70 rm -f $dst/cfgman.html.gz
71 ln -s $dst/$file $dst/cfgman.html.gz
77 if [ -x $dst/make.sh
]; then
85 ..
/commit
/bootstrap squid-3
86 make_snapshot ..
/commit
/squid-
3/mksnapshot.sh trunk v3 HEAD
6
88 rm -f /server
/httpd
/htdocs
/squid-cache.org
/CONTRIBUTORS.new
89 cp ..
/commit
/squid-
3/CONTRIBUTORS
/server
/httpd
/htdocs
/squid-cache.org
/CONTRIBUTORS.new
90 chmod 444 /server
/httpd
/htdocs
/squid-cache.org
/CONTRIBUTORS.new
91 mv -f /server
/httpd
/htdocs
/squid-cache.org
/CONTRIBUTORS.new
/server
/httpd
/htdocs
/squid-cache.org
/CONTRIBUTORS.txt
93 rm -f /server
/httpd
/htdocs
/squid-cache.org
/SPONSORS.new
94 cp ..
/commit
/squid-
3/SPONSORS
/server
/httpd
/htdocs
/squid-cache.org
/SPONSORS.new
95 chmod 444 /server
/httpd
/htdocs
/squid-cache.org
/SPONSORS.new
96 mv -f /server
/httpd
/htdocs
/squid-cache.org
/SPONSORS.new
/server
/httpd
/htdocs
/squid-cache.org
/SPONSORS.txt
98 ..
/commit
/bootstrap squid-3.0
99 make_snapshot ..
/commit
/squid-3.0
/mksnapshot.sh branches
/SQUID_3_0 v3
3.0 3
101 ..
/commit
/bootstrap squid-2
102 make_snapshot ..
/commit
/squid-
2/mksnapshot.sh HEAD v2 HEAD
3
104 ..
/commit
/bootstrap squid-2.7
105 make_snapshot ..
/commit
/squid-2.7
/mksnapshot.sh SQUID_2_7 v2
2.7 3
107 ..
/commit
/bootstrap squid-2.6
108 make_snapshot ..
/commit
/squid-2.6
/mksnapshot.sh SQUID_2_6 v2
2.6 3
110 #../commit/bootstrap squid-2.5
111 #make_snapshot ../commit/squid-2.5/mksnapshot.sh SQUID_2_5 v2 2.5 3
113 #../commit/squid3-SQUID2.sync