# typed: false # frozen_string_literal: true # DO NOT EDIT, it's a script generated class Snazy < Formula desc "snazy - a snazzy json log viewer" homepage "https://github.com/chmouel/snazy" version "%VERSION%" on_macos do url "%MACOS_URL%" sha256 "%MACOS_SHA256%" def install bin.install "snazy" => "snazy" prefix.install_metafiles output = Utils.popen_read("SHELL=bash #{bin}/snazy --shell-completion bash") (bash_completion/"snazy").write output output = Utils.popen_read("SHELL=zsh #{bin}/snazy --shell-completion zsh") (zsh_completion/"_snazy").write output output = Utils.popen_read("SHELL=fish #{bin}/snazy --shell-completion fish") (fish_completion/"snazy.fish").write output end end on_linux do if Hardware::CPU.intel? url "%LINUX_URL%" sha256 "%LINUX_SHA256%" def install bin.install "snazy" => "snazy" prefix.install_metafiles output = Utils.popen_read("SHELL=bash #{bin}/snazy --shell-completion bash") (bash_completion/"snazy").write output output = Utils.popen_read("SHELL=zsh #{bin}/snazy --shell-completion zsh") (zsh_completion/"_snazy").write output output = Utils.popen_read("SHELL=fish #{bin}/snazy --shell-completion fish") (fish_completion/"snazy.fish").write output end end if Hardware::CPU.arm? && Hardware::CPU.is_64_bit? url "%LINUX_ARM_URL%" sha256 "%LINUX_ARM_SHA256%" def install bin.install "snazy" => "snazy" prefix.install_metafiles output = Utils.popen_read("SHELL=bash #{bin}/snazy --shell-completion bash") (bash_completion/"snazy").write output output = Utils.popen_read("SHELL=zsh #{bin}/snazy --shell-completion zsh") (zsh_completion/"_snazy").write output output = Utils.popen_read("SHELL=fish #{bin}/snazy --shell-completion fish") (fish_completion/"snazy.fish").write output end end end end