URL for file on Sourceforge

balanga

Son of Beastie

Reaction score: 155
Messages: 3,353

Is there any way to get a URL for a file on Sourceforge?

I want to retrieve a file from Sourceforge via a script but using Sourceforge seems to require interactive use. Is there any way to get the actual remote location of a file being downloaded?
 

Zirias

Aspiring Daemon

Reaction score: 252
Messages: 650

Have a look at /usr/ports/Mk/bsd.sites.mk, sourceforge is listed there. The pattern is this:
Code:
.for p in https http
MASTER_SITE_SOURCEFORGE+= ${p}://downloads.sourceforge.net/project/%SUBDIR%/
.for m in excellmedia freefr jaist kent nchc \
    netcologne netix superb-dca2 superb-sea2 ufpr vorboss
MASTER_SITE_SOURCEFORGE+= ${p}://${m}.dl.sourceforge.net/project/%SUBDIR%/
.endfor
.endfor
with SUBDIR replaced like this:
Code:
${PORTNAME:tl}/${PORTNAME:tl}/${PORTVERSION}
So, to download e.g. FooBar-1.0.tar.gz from a Sourceforge mirror, the following would be a valid URL:
Code:
http://kent.dl.sourceforge.net/project/foobar/foobar/1.0/FooBar-1.0.tar.gz
 
Top