File 10792.patch of Package squid-beta
---------------------
PatchSet 10792
Date: 2007/05/12 16:36:37
Author: hno
Branch: HEAD
Tag: (none)
Log:
Add md5 sums to snapshots
Members:
mksnapshot-cron.sh:1.16->1.17
Index: squid3/mksnapshot-cron.sh
===================================================================
RCS file: /cvsroot/squid/squid3/mksnapshot-cron.sh,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -r1.16 -r1.17
--- squid3/mksnapshot-cron.sh 24 Jan 2007 02:16:48 -0000 1.16
+++ squid3/mksnapshot-cron.sh 12 May 2007 16:36:37 -0000 1.17
@@ -32,17 +32,21 @@
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/'`
# move tarball
+ rm -f $dst/$file.md5
rm -f $dst/$file
+ md5 $file >$dst/$file.md5
cp -p $file $dst/$file
rm -f $file
# update snapshot symlink
rm -f $dst/squid-$ver.snapshot$type
ln -s $file $dst/squid-$ver.snapshot$type
+ rm -f $dst/squid-$ver.snapshot$type.md5
+ ln -s $file $dst/squid-$ver.snapshot$type.md5
# cleanup old snapshots
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
- rm -f $dst/*-$f
+ rm -f $dst/*-$f $dst/*-$f.md5
done
done