-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvmware-fusion-vmcli-nogui.rb
56 lines (49 loc) · 2.11 KB
/
vmware-fusion-vmcli-nogui.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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
# Documentation: https://github.com/ljq/vmware-fusion-vmcli-nogui
class VmwareFusionVmcliNogui < Formula
desc "vmware fusion shortcut management scripts based on the vmrun cli."
homepage "https://github.com/ljq/vmware-fusion-vmcli-nogui"
url "https://github.com/ljq/vmware-fusion-vmcli-nogui/archive/fusion-vmcli-darwin_v1.0.2.tar.gz"
sha256 "401678585c8acdd71dbbe258a2ccf56ffb6648a128b8c49327791f1574ca89f1"
license "MIT"
# depends_on "cmake" => :build
#keg_only :provided_by_macos
def install
# ENV.deparallelize # if your formula fails when building in parallel
# Remove unrecognized options if warned by configure
#system "./configure", "--disable-debug",
# "--disable-dependency-tracking",
# "--disable-silent-rules",
# "--prefix=#{prefix}"
# system "cmake", ".", *std_cmake_args
etc.install "fusion-vmcli.conf" => "fusion-vmcli.conf"
bin.install "fusion-vmcli"
end
def caveats
info = <<~EOS
For the first time, You can edit the configuration file:
vim #{HOMEBREW_PREFIX}/etc/fusion-vmcli.conf
Default path is "/Users/$(whoami)/Documents/Virtual\ Machines.localized".
s
Custom paths are recommended,$(whoami) refers to the current login user name.
For example custom path:
mkdir -p ~/VmwareFusionPro
and set:
vm_path="/Users/$(whoami)/VmwareFusionPro"
EOS
info
end
test do
# `test do` will create, run in and delete a temporary directory.
#
# This test will fail and we won't accept that! For Homebrew/homebrew-core
# this will need to be a test that verifies the functionality of the
# software. Run the test with `brew test vmware-fusion-vmcli-nogui`. Options passed
# to `brew install` such as `--HEAD` also need to be provided to `brew test`.
#
# The installed folder is not in the path, so use the entire path to any
# executables being tested: `system "#{bin}/program", "do", "something"`.
system "false"
output = shell_output("#{bin}/fusion-vmcli -h 2>&1", 1)
assert_match "identity_file", output
end
end