<p dir="ltr">>tar xvf $PRGNAM-$VERSION.tar.gz || tar xvf v$VERSION.tar.gz</p>
<p dir="ltr">I use:<br></p>
<p dir="ltr">if [ -e $CWD/$VERSION.tar.gz ]; then<br>
  tar xvf $CWD/$VERSION.tar.gz<br>
else<br>
  tar xvf $CWD/$PRGNAM-$VERSION.tar.gz<br>
fi<br></p>
<p dir="ltr">So that a 'no such file or directory' warning won't get displayed.</p>
<p dir="ltr">---</p>
<br><div class="gmail_quote">On Mon, May 25, 2015, 1:43 AM Heinz Wiesinger <<a href="mailto:pprkut@liwjatan.at">pprkut@liwjatan.at</a>> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On Monday 25 May 2015 03:49:16 Thomas Morper wrote:<br>
> Hello there,<br>
><br>
> A user of one of my SlackBuilds discovered an interesting problem:<br>
><br>
> If you follow the download link from the info file, pointing to a release<br>
> on Github, you'll end up with different filenames depending on whether you<br>
> use a browser or a tool like 'wget', thanks to a 'Content-Disposition'<br>
> header. E.g.:<br>
><br>
> 'Release' link on Github:<br>
> <a href="https://github.com/BlackIkeEagle/par2cmdline/archive/v0.6.11.tar.gz" target="_blank">https://github.com/BlackIkeEagle/par2cmdline/archive/v0.6.11.tar.gz</a><br>
><br>
> As expected, wget will save the archive as 'v0.6.11.tar.gz'. However,<br>
> Firefox will save it as 'par2cmdline-0.6.11.tar.gz', so anybody following<br>
> the download link from the <a href="http://slackbuilds.org" target="_blank">slackbuilds.org</a> web site will get a non-working<br>
> build. Most of the Github links I've checked behave this way.<br>
><br>
> What would be a good way to handle this? Editing the SlackBuild script to<br>
> handle both names doesn't seem very desirable. Do we have to resort to<br>
> self hosting?<br>
<br>
There is actually a download URL scheme that works better (IMHO, anyway), but<br>
it's not easily discoverable.<br>
<br>
<a href="https://github.com/" target="_blank">https://github.com/</a><user>/<project>/tarball/<tagname>/<tarballname>.tar.gz<br>
<br>
In your case this would translate to<br>
<br>
<a href="https://github.com/BlackIkeEagle/par2cmdline/tarball/v0.6.11/par2cmdline-0.6.11.tar.gz" target="_blank">https://github.com/BlackIkeEagle/par2cmdline/tarball/v0.6.11/par2cmdline-0.6.11.tar.gz</a><br>
<br>
The downside of this download is that the foldername inside the tarball differs<br>
with every version since it includes the git hash of the release tag.<br>
Also, apparently this is using a github legacy API, so they might turn it off<br>
at some point, but for now it works fine for me.<br>
<br>
Grs,<br>
Heinz_______________________________________________<br>
SlackBuilds-users mailing list<br>
<a href="mailto:SlackBuilds-users@slackbuilds.org" target="_blank">SlackBuilds-users@slackbuilds.org</a><br>
<a href="http://lists.slackbuilds.org/mailman/listinfo/slackbuilds-users" target="_blank">http://lists.slackbuilds.org/mailman/listinfo/slackbuilds-users</a><br>
Archives - <a href="http://lists.slackbuilds.org/pipermail/slackbuilds-users/" target="_blank">http://lists.slackbuilds.org/pipermail/slackbuilds-users/</a><br>
FAQ - <a href="http://slackbuilds.org/faq/" target="_blank">http://slackbuilds.org/faq/</a><br>
<br>
</blockquote></div>