Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bash-snippets 1.1.1 (new formula) #15107

Closed
wants to merge 3 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
34 changes: 34 additions & 0 deletions Formula/bash-snippets.rb
@@ -0,0 +1,34 @@
class BashSnippets < Formula
desc "Collection of small bash scripts for heavy terminal users"
homepage "https://github.com/alexanderepstein/Bash-Snippets"
url "https://github.com/alexanderepstein/Bash-Snippets/archive/v1.5.0.tar.gz"
sha256 "4b96af15bdb34e6b48ec38f95bd0a68b0315776bf7e14c56011d5f27876ec520"

option "without-crypt", "Don't install crypt"
option "without-currency", "Don't install currency"
option "without-movies", "Don't install movies"
option "without-short", "Don't install short"
option "without-stocks", "Don't install stocks"
option "without-taste", "Don't install taste"
option "without-weather", "Don't install weather"

def install
snippets = %w[crypt currency movies short stocks taste weather]

snippets.delete("crypt") if build.without?("crypt")
snippets.delete("currency") if build.without?("currency")
snippets.delete("movies") if build.without?("movies")
snippets.delete("short") if build.without?("short")
snippets.delete("stocks") if build.without?("stocks")
snippets.delete("taste") if build.without?("taste")
snippets.delete("weather") if build.without?("weather")

snippets.each do |snippet|
bin.install "#{snippet}/#{snippet}"
end
end

test do
system "#{bin}/crypt", "-h"
end
end