Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add jc package #932

Merged
merged 2 commits into from
Nov 10, 2023
Merged

Add jc package #932

merged 2 commits into from
Nov 10, 2023

Conversation

mralusw
Copy link
Contributor

@mralusw mralusw commented Nov 9, 2023

Besides adding jc, this PR showcases a cleaner way to extract URL / version from the GH-release JSON file; the code is explained in the last commit. This method also cuts down on external shell calls (a single grep, down from 5 external utility calls for most packages); the rest is done via shell string-ops.

mralusw added 2 commits July 23, 2023 16:45
How the code works: from JSON take (via `grep -m1 -o`) the line
  "browser_download_url": "https://github.com/kellyjonbrazil/jc/releases/download/v1.23.6/jc_1.23.6-1_amd64.deb"

1. extract the matching key/value pair, excluding the final dquote.
2. remove everything upto and including the first dquote -> URL
3. from the URL, remove everything upto & including /download/v
4. then remove everything from '/' onwards -> version
@flexiondotorg flexiondotorg merged commit 7ae1797 into wimpysworld:main Nov 10, 2023
@mralusw mralusw deleted the add-apps-jc branch November 10, 2023 15:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants