File tree Expand file tree Collapse file tree 1 file changed +21
-0
lines changed Expand file tree Collapse file tree 1 file changed +21
-0
lines changed Original file line number Diff line number Diff line change 1+ class XCmd < Formula
2+ desc "Bootstrap 1000+ command-line tools in seconds"
3+ homepage "https://x-cmd.com"
4+ url "https://github.com/x-cmd/x-cmd/archive/refs/tags/v0.5.6.tar.gz"
5+ sha256 "7e60e2851d9eafd2474b17706fef9919a31eba5aacdfd79e8f4d488f477ca021"
6+ license all_of : [ "AGPL-3.0-only" , "MIT" , "BSD-3-Clause" ]
7+
8+ head "https://github.com/x-cmd/x-cmd.git" , branch : "X"
9+
10+ def install
11+ prefix . install Dir . glob ( "*" )
12+ prefix . install Dir . glob ( ".x-cmd" )
13+ inreplace prefix /"mod/x-cmd/lib/bin/x-cmd" , "/opt/homebrew/Cellar/x-cmd/latest" , prefix . to_s
14+ bin . install prefix /"mod/x-cmd/lib/bin/x-cmd"
15+ end
16+
17+ test do
18+ assert_match "Welcome to x-cmd" , shell_output ( "#{ bin } /x-cmd 2>&1" )
19+ assert_match "hello" , shell_output ( "#{ bin } /x-cmd cowsay hello" )
20+ end
21+ end
You can’t perform that action at this time.
0 commit comments