[Slackbuilds-users] Github file name issue
Ryan P.C. McQuen
ryan.q at linux.com
Mon May 25 14:52:52 UTC 2015
>tar xvf $PRGNAM-$VERSION.tar.gz || tar xvf v$VERSION.tar.gz
if [ -e $CWD/$VERSION.tar.gz ]; then
tar xvf $CWD/$VERSION.tar.gz
tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
So that a 'no such file or directory' warning won't get displayed.
On Mon, May 25, 2015, 1:43 AM Heinz Wiesinger <pprkut at liwjatan.at> wrote:
> On Monday 25 May 2015 03:49:16 Thomas Morper wrote:
> > Hello there,
> > A user of one of my SlackBuilds discovered an interesting problem:
> > If you follow the download link from the info file, pointing to a release
> > on Github, you'll end up with different filenames depending on whether
> > use a browser or a tool like 'wget', thanks to a 'Content-Disposition'
> > header. E.g.:
> > 'Release' link on Github:
> > https://github.com/BlackIkeEagle/par2cmdline/archive/v0.6.11.tar.gz
> > As expected, wget will save the archive as 'v0.6.11.tar.gz'. However,
> > Firefox will save it as 'par2cmdline-0.6.11.tar.gz', so anybody following
> > the download link from the slackbuilds.org web site will get a
> > build. Most of the Github links I've checked behave this way.
> > What would be a good way to handle this? Editing the SlackBuild script to
> > handle both names doesn't seem very desirable. Do we have to resort to
> > self hosting?
> There is actually a download URL scheme that works better (IMHO, anyway),
> it's not easily discoverable.
> In your case this would translate to
> The downside of this download is that the foldername inside the tarball
> with every version since it includes the git hash of the release tag.
> Also, apparently this is using a github legacy API, so they might turn it
> at some point, but for now it works fine for me.
> SlackBuilds-users mailing list
> SlackBuilds-users at slackbuilds.org
> Archives - http://lists.slackbuilds.org/pipermail/slackbuilds-users/
> FAQ - http://slackbuilds.org/faq/
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the SlackBuilds-users