<div class="gmail_quote">On Fri, May 22, 2009 at 6:17 PM, David Spencer <span dir="ltr">&lt;<a href="mailto:nobbutl@yahoo.co.uk">nobbutl@yahoo.co.uk</a>&gt;</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">&gt; The attached is a much smaller change targeting the stable branch, making<br>
&gt; the md5 check unconditional (but with no &quot;download again&quot; option). Any<br>
&gt; 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&#39;t changed to $SRCDIR when the<br>
body of &#39;if [ ( -z $SRCNAME ... fi&#39; is skipped, so the md5sum check then<br>
fails (file not found).<br>
<br>
I&#39;d suggest adding &#39;cd $SRCDIR&#39; up before that &#39;if&#39; statement (just<br>
after &#39;. &quot;$INFO&quot;&#39; which you also had to move), so that the current<br>
directory is the same whether or not the body of the &#39;if&#39; statement has<br>
been executed. �In other words<br>
<br>
 � �SRCNAME=$(get_source_names &quot;$INFO&quot;)<br>
 � �. &quot;$INFO&quot;<br>
 � �cd $SRCDIR<br>
 � �if [[ (-z &quot;$SRCNAME&quot;) || (! -f &quot;$SRCDIR/$SRCNAME&quot;) ]]; 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 &quot;$SRCDIR/$SRCNAME&quot; | cut -d&#39; &#39; -f1)</blockquote><div><br>Umph.<br>Thank you, I&#39;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>