summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorZhang Hua2025-03-31 19:38:42 +0800
committerZhang Hua2025-03-31 19:38:42 +0800
commit2a870e09b08c51e88a5b3ae67317e71f14b60126 (patch)
tree1bdb4e68802fdd633f7406df8f755db35562911f
parent8832bee5bf99d22abc3f353a8642e80a5f69f744 (diff)
downloadaur-hplip-plugin.tar.gz
Use curl config instead wrapper
-rw-r--r--.gitignore2
-rw-r--r--PKGBUILD3
-rwxr-xr-xcurl-firefox3
-rw-r--r--ua.curlrc1
4 files changed, 4 insertions, 5 deletions
diff --git a/.gitignore b/.gitignore
index 6e311e43788a..9859acdc7964 100644
--- a/.gitignore
+++ b/.gitignore
@@ -3,4 +3,4 @@
!.nvchecker.toml
!.SRCINFO
!PKGBUILD
-!curl-firefox
+!*.curlrc
diff --git a/PKGBUILD b/PKGBUILD
index 294789f81716..9c1c80971e86 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -26,7 +26,8 @@ source=(
sha256sums=('aa3fe95f5e6970447a2244a88af0f83b92a88d49aa4a0553f0709916b4597d20')
validpgpkeys=('4ABA2F66DBD5A95894910E0673D770CDA59047B9') # HPLIP (HP Linux Imaging and Printing) <hplip@hp.com>
-DLAGENTS=('https::./curl-firefox -qgb "" -fLC - --retry 3 --retry-delay 3 -o %o %u')
+# Thanks to https://bbs.archlinux.org/viewtopic.php?pid=2170899#p2170899
+DLAGENTS=('https::/usr/bin/curl --config ua.curlrc -qgb "" -fLC - --retry 3 --retry-delay 3 -o %o %u')
prepare() {
sh "hplip-$pkgver-plugin.run" --target "$srcdir/hplip-$pkgver-plugin" --noexec
diff --git a/curl-firefox b/curl-firefox
deleted file mode 100755
index cd7e34b809cb..000000000000
--- a/curl-firefox
+++ /dev/null
@@ -1,3 +0,0 @@
-#!/usr/bin/bash
-
-/usr/bin/curl -A "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36" "$@"
diff --git a/ua.curlrc b/ua.curlrc
new file mode 100644
index 000000000000..51f3d35573d6
--- /dev/null
+++ b/ua.curlrc
@@ -0,0 +1 @@
+user-agent = "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36"