Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Compared to my other package contributions,
GH_OWNER_REPO
,SUMMARY
andDEB_PKGNAME
.SUMMARY
is not available from the cached json, andDEB_PKGNAME
could presumably be different from the repo name (also, a repo can release multiple packages resulting in multiple debs for the same host architecture, e.g.pkg-common
,pkg-full
,pkg-tiny
etc)pkg_<NAME>
function so as not to pollute global namespace and avoid collisions with other packages / futureDEB_GET
mechanismsVERSION_PUBLISHED
is inferred from the*.deb
filename, as release versions / tags in the URL (which I've used previously) don't necessarily match that the.deb
versionDiscussion
At some point I'd like to propose standardizing
get_github_url()
, a function that sets theURL
variable; the most commonly used mechanism ofgrep ... head ... cut
is somewhat haphazard and also causes at least two unnecessaryfork()
'/exec()
's per package. These don't matter compared to network access, but a lot ofdeb_get
ops involve cached files without any network updates.I'm still using a single
grep -m1 -o
, but I think it's actually possible to read the cached file into a string and search withbash
regexes, without any external utilities at all, and without subshell-ing. Such an optimization would only change the proposedget_github_url
function.