Skip to content

Instantly share code, notes, and snippets.

View da115115's full-sized avatar

Denis A da115115

  • France
  • 09:30 (UTC +01:00)
View GitHub Profile
@da115115
da115115 / getGitHubLatestRelease.sh
Created May 18, 2019 11:10
Extract the release tag (version) of the latest release of a given GitHub repository, potentially for specific OS, architecture and package type
#!/bin/bash
git_repo="containernetworking/plugins"
os="linux"
arch="amd64"
pack="tgz"
if [ -z "$1" -o "$1" = "-h" -o "$1" = "--help" ]
then
echo
{'por_code': 'CBE', 'in_optd': 1, 'in_iata': 1, 'env_id': '', 'date_from': '', 'date_until': '', 'it_state_code': 'MD', 'it_ctry_code': 'US', 'it_cty_code': 'CBE', 'it_loc_type': 'A', 'optd_geo_id': '4803461', 'optd_state_code': 'WV', 'optd_ctry_code': 'US', 'optd_cty_list': 'CBE', 'optd_loc_type': 'A', 'optd_feat_class': 'S', 'optd_feat_code': 'AIRP', 'optd_page_rank': '', 'reason': 'IATA- and OPTD-derived POR have not the same state codes'}
{'por_code': 'GYY', 'in_optd': 1, 'in_iata': 1, 'env_id': '', 'date_from': '', 'date_until': '', 'it_state_code': 'IL', 'it_ctry_code': 'US', 'it_cty_code': 'CHI', 'it_loc_type': 'A', 'optd_geo_id': '4920629', 'optd_state_code': 'IN', 'optd_ctry_code': 'US', 'optd_cty_list': 'CHI', 'optd_loc_type': 'A', 'optd_feat_class': 'S', 'optd_feat_code': 'AIRP', 'optd_page_rank': '', 'reason': 'IATA- and OPTD-derived POR have not the same state codes'}
{'por_code': 'CVG', 'in_optd': 1, 'in_iata': 1, 'env_id': '', 'date_from': '', 'date_until': '', 'it_state_code': 'OH', 'it_ctry_c