]>
git.ipfire.org Git - thirdparty/squid.git/blob - mksnapshot-cron.sh
3 ## Copyright (C) 1996-2018 The Squid Software Foundation and contributors
5 ## Squid software is distributed under GPLv2+ license and includes
6 ## contributions from numerous individuals and organizations.
7 ## Please see the COPYING and CONTRIBUTORS files for details.
11 # Nightly cron job to generate snapshot releases
13 versions
=/server
/httpd
/htdocs
/squid-cache.org
/content
/Versions
/
14 TMPDIR
=/home
/squidadm
/${LOGNAME}.cron
16 if [ -d ${TMPDIR} ]; then
21 trap "echo FAIL-BUILD_snapshot-cron; cd /; chmod -R +w ${TMPDIR}; rm -rf ${TMPDIR}" 0
23 PATH
=/sbin
:/bin
:/usr
/sbin
:/usr
/bin
:/usr
/local
/bin
26 # Be nice to our friends. This is a batch job
27 renice
10 $$
>/dev
/null
38 dst
=${versions}/${dir}/${ver}
39 out
=${6:-`basename $branch`}
40 $mksnap ${branch} ${6} 2>&1 |
grep -v "set owner/group"
41 for file in `cat ${out}.out` ; do
53 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/'`
57 rm -f ${dst}/${file}.md5
59 md5
${file} >${dst}/${file}.md5
60 cp -p ${file} ${dst}/${file}
63 # update snapshot symlink
64 rm -f ${dst}/squid-
${ver}.snapshot
$type
65 ln -s ${file} ${dst}/squid-${ver}.snapshot${type}
66 rm -f ${dst}/squid-${ver}.snapshot${type}.md5
67 ln -s ${file}.md5 ${dst}/squid-${ver}.snapshot${type}.md5
70 # cleanup old snapshots
71 ls ${dst}/*-[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]-r*[0-9]${type} | \
72 # sed -e 's/.*-\([0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]-r[0-9]+'${type}'\)/\1/' | \
73 sort -r |
tail +${save} | \
79 # update dynamic index pages Last-Modified info
80 touch ${dst}/index.dyn
85 mkdir
-p ${dst}/cfgman
86 tar -C ${dst}/cfgman -zxf ${dst}/${file}
89 rm -f ${dst}/cfgman.html
90 ln -s ${dst}/${file} ${dst}/cfgman.html
93 rm -f ${dst}/cfgman.html.gz
94 ln -s ${dst}/${file} ${dst}/cfgman.html.gz
97 mkdir
-p ${dst}/manuals
98 tar -C ${dst}/manuals -zxf ${dst}/${file}
106 # autotool derived files not kept in trunk, but still need to bootstrap for make dist
107 #../commit/bootstrap squid-3
108 #make_snapshot ../commit/squid-3/mksnapshot.sh trunk v3 3.HEAD 6
110 #rm -f /server/httpd/htdocs/squid-cache.org/CONTRIBUTORS.new
111 #cp ../commit/squid-3/CONTRIBUTORS /server/httpd/htdocs/squid-cache.org/CONTRIBUTORS.new
112 #chmod 444 /server/httpd/htdocs/squid-cache.org/CONTRIBUTORS.new
113 #mv -f /server/httpd/htdocs/squid-cache.org/CONTRIBUTORS.new /server/httpd/htdocs/squid-cache.org/content/CONTRIBUTORS.txt
115 #rm -f /server/httpd/htdocs/squid-cache.org/SPONSORS.new
116 #cp ../commit/squid-3/SPONSORS /server/httpd/htdocs/squid-cache.org/SPONSORS.new
117 #chmod 444 /server/httpd/htdocs/squid-cache.org/SPONSORS.new
118 #mv -f /server/httpd/htdocs/squid-cache.org/SPONSORS.new /server/httpd/htdocs/squid-cache.org/content/SPONSORS.txt
120 ..
/commit
/bootstrap squid-3.4
121 make_snapshot ..
/commit
/squid-
3/mksnapshot.sh
3.4 v3
3.4 30
123 ..
/commit
/bootstrap squid-3.3
124 make_snapshot ..
/commit
/squid-
3/mksnapshot.sh
3.3 v3
3.3 30
126 #../commit/bootstrap squid-3.2
127 #make_snapshot ../commit/squid-3/mksnapshot.sh branches/SQUID_3_2 v3 3.2 30
129 #../commit/bootstrap squid-3.1
130 #make_snapshot ../commit/squid-3/mksnapshot.sh branches/SQUID_3_1 v3 3.1 30
132 #../commit/bootstrap squid-3.0
133 #make_snapshot ../commit/squid-3/mksnapshot.sh branches/SQUID_3_0 v3 3.0 3
135 #../commit/bootstrap squid-2
136 #make_snapshot ../commit/squid-2/mksnapshot.sh HEAD v2 HEAD 3
138 #../commit/bootstrap squid-2.7
139 #make_snapshot ../commit/squid-2.7/mksnapshot.sh SQUID_2_7 v2 2.7 3
141 #../commit/bootstrap squid-2.6
142 #make_snapshot ../commit/squid-2.6/mksnapshot.sh SQUID_2_6 v2 2.6 3
144 #../commit/bootstrap squid-2.5
145 #make_snapshot ../commit/squid-2.5/mksnapshot.sh SQUID_2_5 v2 2.5 3
147 #../commit/squid3-SQUID2.sync
150 ..
/commit
/bootstrap squid-3.5
151 make_snapshot ..
/commit
/squid-
3/mksnapshot.sh
3.5 v3
3.5 30