Installer: allow installing specific versions

This commit is contained in:
Kovid Goyal 2024-08-19 10:25:51 +05:30
parent 7c4977146f
commit b3b2f56890
No known key found for this signature in database
GPG key ID: 06BC317B515ACE7C
2 changed files with 7 additions and 2 deletions

View file

@ -99,12 +99,12 @@ Customizing the installation
_kitty_install_cmd \
installer=nightly dest=/some/other/location
* You can specify a different install location, with ``dest``:
* You can specify a specific version to install, with:
.. code-block:: sh
_kitty_install_cmd \
dest=/some/other/location
installer=version-0.35.2
* You can tell the installer not to launch |kitty| after installing it with
``launch=n``:

View file

@ -98,6 +98,9 @@ get_release_url() {
get_file_url "v$release_version" "$release_version"
}
get_version_url() {
get_file_url "v$1" "$1"
}
get_nightly_url() {
get_file_url "nightly" "nightly"
@ -105,9 +108,11 @@ get_nightly_url() {
get_download_url() {
installer_is_file="n"
echo "$installer"
case "$installer" in
"nightly") get_nightly_url ;;
"") get_release_url ;;
version-*) get_version_url "${installer#*-}";;
*) installer_is_file="y" ;;
esac
}