![]() Here $(uname) will return either Darwin, Linux, etc. | grep -wo "https.*$(uname).*gz" | wget -qi. You can also parameterize the grep argument so that it'll "dynamically" determine what platform it was run on and substitute in the appropriate string based on that. To further reveal what's going on here's a broader grep of the API endpoint: $ curl -s | grep -wo "https.*" | grep gzĪbove you can see the URLs that matched. Pass the URL to the command wget -qi - so that it'll get downloaded. ![]() Parse that output looking for an artifact that matches the pattern https.*Linux.*gz.Pulling the API side of GitHub to get information about the release artifacts with the tag latest.| grep -wo "https.*Linux.*gz" | wget -qi. This can be done in a single one-liner like so: $ curl -s \ UpdateDownloadButton(release, "portable.zip", $(".portable")) įunction UpdateDownloadButton(release, assetExtension, element) , UpdateDownloadButton(release, ".exe", $(".setup"))
0 Comments
Leave a Reply. |