[Slackbuilds-users] Using a Git repo as the source

B. Watson urchlay at slackware.uk
Sun Jun 9 06:45:22 UTC 2024



On Sat, 8 Jun 2024, Shahab Vahedi via SlackBuilds-users wrote:

>> https://github.com/csmith-project/creduce/archive/refs/heads/llvm-13.0.zip
>
> I didn't know about this. Thanks! That will solve the problem.
>
> In general, any push to this branch, will require an update of the MD5.
> I guess it is what it is.

Download the file and host it somewhere else.

If you decide to use the github link, beware: the link results in a
different filename being saved, depending on whether or not the client
uses the Content-disposition header. Example:

$ mkdir a
$ cd a
$ wget --quiet --content-disposition https://github.com/csmith-project/creduce/archive/refs/heads/llvm-13.0.zip
$ ls
creduce-llvm-13.0.zip
$ wget --quiet --no-content-disposition https://github.com/csmith-project/creduce/archive/refs/heads/llvm-13.0.zip
creduce-llvm-13.0.zip  llvm-13.0.zip

This is annoying, but not fatal. Just make sure your SlackBuild script
can cope with either filename. One way to do it:

ZIPFILE=$CWD/$PRGNAM-llvm-13.0.zip
[ ! -e $ZIPFILE ] || ZIPFILE=$CWD/llvm-13.0.zip
unzip $ZIPFILE

Another thing... if you change the .zip to .tar.gz in the URL, you get
a tarball instead of a zip file. I just checked, and the .tar.gz file
is 25% smaller than the zip file, but the contents are identical. So
that seems like a win.


More information about the SlackBuilds-users mailing list