<div class="gmail_quote">On Fri, May 22, 2009 at 6:17 PM, David Spencer <span dir="ltr"><<a href="mailto:nobbutl@yahoo.co.uk">nobbutl@yahoo.co.uk</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div class="im">> The attached is a much smaller change targeting the stable branch, making<br>
> the md5 check unconditional (but with no "download again" option). Any<br>
> chance you can give it a spin before the commit?<br>
<br>
</div>Hi Mauro, many thanks for such a quick response! �The patch *almost*<br>
works ;-)<br>
<br>
Unfortunately the current directory isn't changed to $SRCDIR when the<br>
body of 'if [ ( -z $SRCNAME ... fi' is skipped, so the md5sum check then<br>
fails (file not found).<br>
<br>
I'd suggest adding 'cd $SRCDIR' up before that 'if' statement (just<br>
after '. "$INFO"' which you also had to move), so that the current<br>
directory is the same whether or not the body of the 'if' statement has<br>
been executed. �In other words<br>
<br>
� �SRCNAME=$(get_source_names "$INFO")<br>
� �. "$INFO"<br>
� �cd $SRCDIR<br>
� �if [[ (-z "$SRCNAME") || (! -f "$SRCDIR/$SRCNAME") ]]; then<br>
� � � �mkdir -p $DLDIR<br>
� � � �cd $DLDIR<br>
� � � �...<br>
� � � �cd $SRCDIR<br>
� � � �rm -rf $DLDIR<br>
� �fi<br>
<br>
That seems slightly better than the alternative solution, which is to<br>
add $SRCDIR to the pathname in the md5sum command<br>
<br>
� � � �MD5CHK=$(md5sum "$SRCDIR/$SRCNAME" | cut -d' ' -f1)</blockquote><div><br>Umph.<br>Thank you, I'll commit the fixed patch on Monday.<br>�</div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hope this helps, sorry not to do a proper patch but such things are<br>
dangerous in the hands of amateurs like me :-)</blockquote><div><br>:-)<br>�<br></div></div>-- <br>Mauro Giachero<br>