mirror of
https://github.com/agresdominik/repo.git
synced 2026-04-21 18:05:51 +00:00
fix: write commands.json after install
This commit is contained in:
+14
-1
@@ -9,7 +9,20 @@ class Cheatsh < Formula
|
||||
depends_on "go" => :build
|
||||
|
||||
def install
|
||||
system "make", "install", "PREFIX=#{prefix}"
|
||||
system "make", "install",
|
||||
"PREFIX=#{prefix}",
|
||||
"SYSCONFDIR=#{etc}/cheatsh"
|
||||
end
|
||||
|
||||
def post_install
|
||||
config_dir = "#{Dir.home}/.config/cheatsh"
|
||||
FileUtils.mkdir_p config_dir
|
||||
|
||||
["commands.json", "commands_template.json"].each do |f|
|
||||
src = "#{etc}/cheatsh/#{f}"
|
||||
dest = "#{config_dir}/#{f}"
|
||||
FileUtils.cp(src, dest)
|
||||
end
|
||||
end
|
||||
|
||||
def caveats
|
||||
|
||||
Reference in New Issue
Block a user