You are not logged in.

#1 2022-08-19 09:55:02

Malvineous
Member
From: Brisbane, Australia
Registered: 2011-02-03
Posts: 189
Website

[SOLVED] Can you pass custom options to curl?

I am updating a PKGBUILD for AUR and I have discovered that the server won't allow curl to download the package file:

$ curl https://dl.dell.com/FOLDER07456510M/1/Dell-OM-MIBS-10100_A00.zip
[...]
<H1>Access Denied</H1>

However if I change the user agent then it works fine:

curl --user-agent "Not cURL" https://dl.dell.com/FOLDER07456510M/1/Dell-OM-MIBS-10100_A00.zip > download.zip

I can't immediately see how to adjust a PKGBUILD so that this option gets passed to curl when running makepkg.  Can anyone advise?

Last edited by Malvineous (2022-08-23 06:36:39)

Offline

#2 2022-08-19 10:05:29

a821
Member
Registered: 2012-10-31
Posts: 381

Re: [SOLVED] Can you pass custom options to curl?

Add the option --user-agent to curl in DLAGENTS in the PKGBUILD. This works for me

DLAGENTS=('https::/usr/bin/curl -qgb "" -fLC - --retry 3 --user-agent Mozilla --retry-delay 3 -o %o %u')

Offline

#3 2022-08-23 06:36:52

Malvineous
Member
From: Brisbane, Australia
Registered: 2011-02-03
Posts: 189
Website

Re: [SOLVED] Can you pass custom options to curl?

Thanks for that, that did the trick!

Offline

Board footer

Powered by FluxBB