[Slackbuilds-users] Content Disposition part 2

Dave Woodfall dave at slackbuilds.org
Sat Apr 30 22:10:37 UTC 2022


On 30/04/22 18:00,
Andrew Payne <phalange at komputermatrix.com> put forth the proposition:
> > On 30/04/22 17:24,
> > Andrew Payne <phalange at komputermatrix.com> put forth the proposition:
> >> For example, my NC url had this typo:
> >> https://github.com/nextcloud/desktop/archive/refs/tags/v3.4.3/desktop-3.4.4.tar.gz
> >
> > In the end the tag wins.  The file will download as any name you
> > choose, so in that link it will be version 3.4.3.  This is the
> > correct URL for version 3.4.4:
> >
> > https://github.com/nextcloud/desktop/archive/v3.4.4/desktop-3.4.4.tar.gz
> >
> >
> >> As for my sakura slackbuild, the tarball naming is
> >> "sakura-SAKURA_3_8_5",
> >> which is silly so I did this:
> >> SRCNAM = SAKURA_3_8_5
> >> [...]
> >> tar xvf $CWD/$PRGNAM-$SRCNAM.tar.gz || tar xvf $CWD/$SRCNAM.tar.gz
> >> mv $TMP/$PRGNAM-$SRCNAM $TMP/$PRGNAM-$VERSION
> >> [...]
> >
> > This seems the same as libxlswriter except you have SAKURA_ instead
> > of RELEASE_.
> >
> > SAKURA_3_8_5 is the tag/version so:
> >
> > https://github.com/dabisu/sakura/archive/SAKURA_3_8_5/sakura-SAKURA_3_8_5.tar.gz
> >
> > Which will extract a directory: sakura-SAKURA_3_8_5
> >
> > With a more normal version 3.8.5 and like you have:
> >
> >> SRCNAM = SAKURA_3_8_5
> >
> > That should be OK:
> >
> > tar xvf $CWD/$PRGNAM-$SRCNAM.tar.gz
> >
> > Should be all that's needed.  I might be tempted to use $SRCVER
> > perhaps, since it is the version according to github.
> >
> Ok, thanks Dave, I'll kill the "if" statement and use that URL.

Just to prove that the tag always wins, try:

wget https://github.com/dabisu/sakura/archive/SAKURA_3_8_5/mickey-mouse.tar.gz

It will download as mickey-mouse.tar.gz, but test it and:

tar tf mickey-mouse.tar.gz | head -n1
sakura-SAKURA_3_8_5/

--
Dave

sbo-maintainer-tools:
https://slackbuilds.org/repository/15.0/system/sbo-maintainer-tools/
SBo templates:
https://slackbuilds.org/templates/


More information about the SlackBuilds-users mailing list