mirror of
https://github.com/dockur/windows.git
synced 2026-05-06 06:31:25 +00:00
Simplify curl-impersonate installation in workflow
Removed the build steps for curl-impersonate and replaced it with a direct installation command.
This commit is contained in:
parent
c77d4cdde3
commit
75165ef15c
1 changed files with 3 additions and 21 deletions
24
.github/workflows/links.yml
vendored
24
.github/workflows/links.yml
vendored
|
|
@ -21,25 +21,6 @@ jobs:
|
|||
uses: actions/checkout@v6
|
||||
with:
|
||||
fetch-depth: 0
|
||||
-
|
||||
name: Build curl-impersonate
|
||||
run: |
|
||||
sudo apt install build-essential pkg-config cmake ninja-build curl autoconf automake libtool
|
||||
# For the Firefox version only
|
||||
sudo apt install python3-pip libnss3
|
||||
pip install gyp-next
|
||||
export PATH="$PATH:~/.local/bin" # Add gyp to PATH
|
||||
git clone https://github.com/lwthiker/curl-impersonate.git
|
||||
cd curl-impersonate
|
||||
mkdir build && cd build
|
||||
../configure
|
||||
# Build and install the Firefox version
|
||||
make firefox-build
|
||||
sudo make firefox-install
|
||||
# You may need to update the linker's cache to find libcurl-impersonate
|
||||
sudo ldconfig
|
||||
# Optionally remove all the build files
|
||||
cd ../ && rm -Rf build
|
||||
-
|
||||
name: Validate Links
|
||||
run: |
|
||||
|
|
@ -47,11 +28,12 @@ jobs:
|
|||
count=0
|
||||
host=""
|
||||
declare -A seen
|
||||
sudo apt-get install curl-impersonate
|
||||
check() {
|
||||
local url="$1" http
|
||||
http=$(curl_ff117 -sSL -o /dev/null -w "%{http_code}" --user-agent "Mozilla/5.0 (X11; Linux x86_64; rv:95.0) Gecko/20100101 Firefox/95.0)" --max-time 10 -I -- "$url" 2>&1) || http="000"
|
||||
http=$(curl_ff -sSL -o /dev/null -w "%{http_code}" --user-agent "Mozilla/5.0 (X11; Linux x86_64; rv:95.0) Gecko/20100101 Firefox/95.0)" --max-time 10 -I -- "$url" 2>&1) || http="000"
|
||||
[[ "$http" == 2* ]] && return 0
|
||||
http=$(curl_ff117 -sSL -o /dev/null -w "%{http_code}" --user-agent "Mozilla/5.0 (X11; Linux x86_64; rv:95.0) Gecko/20100101 Firefox/95.0)" --max-time 10 -r "0-0" -- "$url" 2>&1) || http="000"
|
||||
http=$(curl_ff -sSL -o /dev/null -w "%{http_code}" --user-agent "Mozilla/5.0 (X11; Linux x86_64; rv:95.0) Gecko/20100101 Firefox/95.0)" --max-time 10 -r "0-0" -- "$url" 2>&1) || http="000"
|
||||
printf '%s\n' "HTTP: $http"
|
||||
[[ "$http" == 2* ]]
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue