Download the latest release of a github repo, post-process it and symlink it to some place in your $PATH
.
there is a ghri.yaml which contains some global configuration and package-config.
call ./ghri
to install all packages or ./ghri $packagename
to install a single package
It's the path where downloads are stored. It may be a relative path to the directory of the script
It's the path where you executables will be symlinked to. It may be a relative path to the directory of the script
It's the path where github api call will be cached, to prevent api rate limiting It may be a relative path to the directory of the script
The cache lifetime in seconds, items older than this will be refreshed
Packages are defined here, package-options are:
String in the format owner/repo
pointing to the github repository. The slug for the linux kernel would be torvalds/linux
the name of the symlink, if not given the second part of the slug is used
A matcher to find the right asset of a given release.
It could either be a regular expression as it's given to preg_match()
(including the delimiter eg.: /^foo.*bar$/
)
or a glob as it is given to fnmatch()
every assets filename of the latest release is checkt against this matcher, if there is exactly one match, this asset is used
Defaults to *
which works if only one asset ist given
A list of postprocessors to make the asset ready for usage
If there is no further configuration given to postprocessor just give the name,
otherwise an object with at least a property named name
to identify the processor and any configuration that's required by the processor
bunzip2 a bz2
file
no configuration available
gunzip a gz file no configuration available
set a symlink into symlink_path
pointing to the processed asset with the package name as it's name
make the asset executable (0755
)
untar a tar file
optional configuration value: asset_matcher
to filter out the right file from the archive to feed to the next post processor, default is *
executes the linked asset to check it is executable, will fail if the exit code is != 0 optional parameters:
list of arguments given to the command, like -v
or --version
configure if the output of the testrun is hidden, default: false if the command is able to show it's version, or a small single line string that shows it's working use that.
unzip a zip file
optional configuration value: asset_matcher
to filter out the right file from the archive to feed to the next post processor, default is *
unpack a xz file
optional configuration value: asset_matcher
to filter out the right file from the archive to feed to the next post processor, default is *