girsh¶
The Git Installer is a Python script designed to automate the process of downloading, extracting, and installing binary releases from GitHub repositories. It also supports uninstalling previously installed binaries and caching version information to avoid redundant installations.
Features¶
- Download Releases - Downloads assets from the latest GitHub release based on a regex pattern.
- Extract Archives Securely -
Supports native binaries as well as extraction of
.tar.gz/.tgz,.zipand.tar.bz2/.bz2archives with simple or pattern based search of the contained binary. - Optional Renaming - Allows you to specify a filter and renaming rule to select the correct binary from an extracted archive.
- Installation and Re-installation -
Automatically copies the binary to the appropriate binary folder based on user privileges
(e.g., /
usr/local/binfor root,~/.local/binfor non-root). Use the--reinstalloption to force a re-install. - Uninstallation -
Provides an uninstall option (
--uninstall-all) that removes all binaries installed by the script, based on the cached information. Individual packages can be uninstalled by removing them from the settings file and then runninggirsh --uninstall. - Install logs - The script tracks installed versions and binary names in a installed settings file, avoiding unnecessary downloads and installations if the version hasn’t changed.
- Pre- and post update/uninstall commands Optional commands to be executed before update/uninstall and after update, e.g. stop/start process