Get the latest version with git clone
:
git clone https://github.com/curl/curl.git
Check the version:
cd curl
git log #list the first 3 lines
commit def99e011e88d61a4157863537378ca9c59a79e0 (HEAD -> master, origin/master, origin/HEAD)
Author: Stefan Eissing <stefan@eissing.org>
Date: Mon Jun 26 11:51:43 2023 +0200
git describe def99e011e88d61a4157863537378ca9c59a79e0
curl-8_1_2-143-gdef99e011
We see that the version is curl-8_1_2-143
.
Download the version 8_1_1
with browser:
https://github.com/curl/curl/releases
Click on curl-8.1.1.zip
and save,i got the historical version of curl-8_1_1
in zip file.
How can download historical version of curl in zip file format with shell command then?
The following shell command is not the way i wanted:
url="https://objects.githubusercontent.com/github-production-release-asset-2e65be/569041/b283ef2d-8e6a-478c-97c1-00ccc68a0173?X-Amz-Algorithm=\
AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIWNJYAX4CSVEH53A%2F20230709%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20230709T054141Z&X-Amz-Expires=\
300&X-Amz-Signature=18425539998f0f6c17ac2f2a38a1e56573a7217f8bb87bf568549c43d5011a60&X-Amz-SignedHeaders=host&actor_id=512610&key_id=0&\
repo_id=569041&response-content-disposition=attachment%3B%20filename%3Dcurl-8.1.1.zip&response-content-type=application%2Foctet-stream"
wget $url -O curl.zip
You already did the clone, check out any version you want. git checkout curl-8_1_1
Or if you really really want the .zip, git archive curl-8_1_1 -o curl-8_1_1.zip