This commit is contained in:
Kovid Goyal 2022-11-17 11:10:17 +05:30
parent 81db5eb82f
commit d2dabc7d57
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -83,12 +83,12 @@ url="https://github.com/kovidgoyal/kitty/releases/download/$release_version/kitt
printf "\033[33mkitty-tool needs to be installed\033[m\n\n" printf "\033[33mkitty-tool needs to be installed\033[m\n\n"
command mkdir -p "$install_dir" command mkdir -p "$install_dir"
printf "Downloading kitty-tool from: \033[32m%s\033[m\n\n" "$url" printf "Downloading kitty-tool from: \033[32m%s\033[m\n\n" "$url"
download_dest="$(mktemp "$kitty_exe.XXXXXXXXXX")" download_dest="$(command mktemp "$kitty_exe.XXXXXXXXXX")"
fetch "$url" > "$download_dest" || { fetch "$url" > "$download_dest" || {
rm -f "$download_dest" command rm -f "$download_dest"
die "Failed to download kitty-tool" die "Failed to download kitty-tool"
} }
chmod 755 "$download_dest" command chmod 755 "$download_dest"
mv "$download_dest" "$kitty_exe" command mv "$download_dest" "$kitty_exe"
command "$kitty_exe" --version | cut -d" " -f2 > "$local_kitty_version_file" command "$kitty_exe" --version | cut -d" " -f2 > "$local_kitty_version_file"
exec_kitty "$@" exec_kitty "$@"