-
-
Notifications
You must be signed in to change notification settings - Fork 9
/
oh-my-posh.rb
39 lines (32 loc) · 1.38 KB
/
oh-my-posh.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
class OhMyPosh < Formula
desc "Prompt theme engine for any shell"
homepage "https://ohmyposh.dev"
url "https://github.com/JanDeDobbeleer/oh-my-posh/archive/v24.17.1.tar.gz"
head "https://github.com/JanDeDobbeleer/oh-my-posh.git", branch: "main"
sha256 "c53c8c62bdc116a9ff11a54f5a0a8f9e0ac1ba594adcfe7dbf4941d663154636"
license "MIT"
version "24.17.1"
depends_on "[email protected]" => :build
def install
Dir.chdir("src") do
ENV["GOPROXY"] = ENV.has_key?("HOMEBREW_GOPROXY") ? ENV["HOMEBREW_GOPROXY"] : ""
system("go build -o=oh-my-posh -ldflags=\"-s -w -X \'github.com/jandedobbeleer/oh-my-posh/src/build.Version=24.17.1\' -X \'github.com/jandedobbeleer/oh-my-posh/src/build.Date=2024-12-22T19:48:08Z\'\"")
bin.install "oh-my-posh"
end
mv "themes", prefix
end
def caveats
<<~EOS
Thanks for installing Oh My Posh.
Have a look at https://ohmyposh.dev/docs/ for detailed instructions for your shell.
Sample themes can be found at $(brew --prefix oh-my-posh)/themes.
If you're enjoying Oh My Posh, feel free to donate or become a sponsor.
https://github.com/sponsors/JanDeDobbeleer
In case you're looking for help, want to share how you use Oh My Posh, or find like-minded individuals, join our Discord community!
https://discord.gg/n7E3DkXssv
EOS
end
test do
system "#{bin}/oh-my-posh", "--help"
end
end