-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
For querying IntelliJ sha256sums.
- Loading branch information
Showing
2 changed files
with
120 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
#!/bin/bash | ||
|
||
download_url='https://data.services.jetbrains.com/products/releases?latest=true&type=release' | ||
|
||
query_utlimate_editions() { | ||
curl -s "$download_url&code=IIU" | jq -r ' | ||
( | ||
.IIU[] | | ||
.version as $version | | ||
.downloads.linux | | ||
[ | ||
$version, | ||
"Ultimate", | ||
.checksumLink | ||
] | ||
) | @tsv' | ||
} | ||
|
||
query_community_editions() { | ||
curl -s "$download_url&code=IIC" | jq -r ' | ||
( | ||
.IIC[] | | ||
.version as $version | | ||
.downloads.linux | | ||
[ | ||
$version, | ||
"Community", | ||
.checksumLink | ||
] | ||
) | @tsv' | ||
} | ||
|
||
query_versions() { | ||
( | ||
query_utlimate_editions | ||
query_community_editions | ||
) | sort -V | ||
} | ||
|
||
query_checksums() { | ||
IFS=$'\t' | ||
while read -r -a columns; do | ||
local version="${columns[0]}" | ||
local edition="${columns[1]}" | ||
local checksum_url="${columns[2]}" | ||
|
||
# Fetch the checksum using curl | ||
local response | ||
response="$(curl -s "$checksum_url")" | ||
checksum="${response%% *}" # Extract the checksum part (everything before the first space) | ||
|
||
# Output the Version, Edition, and Checksum as a tab-separated value | ||
echo -e "${version}\t${edition}\t${checksum}" | ||
done | ||
} | ||
|
||
( | ||
echo 'Version Edition SHA256' | ||
query_versions | query_checksums | ||
) | column -t |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
#!/bin/bash | ||
|
||
download_url='https://data.services.jetbrains.com/products/releases?type=release' | ||
|
||
query_utlimate_editions() { | ||
curl -s "$download_url&code=IIU" | jq -r ' | ||
( | ||
.IIU[] | | ||
.version as $version | | ||
.downloads.linux | | ||
[ | ||
$version, | ||
"Ultimate", | ||
.checksumLink | ||
] | ||
) | @tsv' | ||
} | ||
|
||
query_community_editions() { | ||
curl -s "$download_url&code=IIC" | jq -r ' | ||
( | ||
.IIC[] | | ||
.version as $version | | ||
.downloads.linux | | ||
[ | ||
$version, | ||
"Community", | ||
.checksumLink | ||
] | ||
) | @tsv' | ||
} | ||
|
||
query_versions() { | ||
( | ||
query_utlimate_editions | ||
query_community_editions | ||
) | sort -V | ||
} | ||
|
||
query_checksums() { | ||
IFS=$'\t' | ||
while read -r -a columns; do | ||
local version="${columns[0]}" | ||
local edition="${columns[1]}" | ||
local checksum_url="${columns[2]}" | ||
|
||
# Fetch the checksum using curl | ||
local response | ||
response="$(curl -s "$checksum_url")" | ||
checksum="${response%% *}" # Extract the checksum part (everything before the first space) | ||
|
||
# Output the Version, Edition, and Checksum as a tab-separated value | ||
echo -e "${version}\t${edition}\t${checksum}" | ||
done | ||
} | ||
|
||
( | ||
echo 'Version Edition SHA256' | ||
query_versions | query_checksums | ||
) | column -t |