]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Add md5 sums to snapshots
authorhno <>
Sat, 12 May 2007 22:36:37 +0000 (22:36 +0000)
committerhno <>
Sat, 12 May 2007 22:36:37 +0000 (22:36 +0000)
mksnapshot-cron.sh

index da635c673ef6a6c57e1a964314bf02c2e6858803..d8be5373fcb9a0dc041e838d13d9e2f9c86cc164 100755 (executable)
@@ -32,17 +32,21 @@ make_snapshot()
     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