From 4f783ce840445de36f65dacc6f6ec36b02757c3d Mon Sep 17 00:00:00 2001 From: Anis Elleuch Date: Thu, 14 May 2015 21:11:06 +0000 Subject: [PATCH] Add FreeBSD support --- buildscripts/checkdeps.sh | 5 ++++- cmd_test.go | 4 ++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/buildscripts/checkdeps.sh b/buildscripts/checkdeps.sh index 01acc428..be62c42c 100755 --- a/buildscripts/checkdeps.sh +++ b/buildscripts/checkdeps.sh @@ -103,6 +103,9 @@ is_supported_os() { check_version "${osx_host_version}" "${OSX_VERSION}" [[ $? -ge 2 ]] && die "Minimum OSX version supported is ${OSX_VERSION}" ;; + "FreeBSD") + os="freebsd" + ;; "*") echo "Exiting.. unsupported operating system found" exit 1; @@ -112,7 +115,7 @@ is_supported_os() { is_supported_arch() { local supported case ${UNAME##* } in - "x86_64") + "x86_64" | "amd64") supported=1 ;; *) diff --git a/cmd_test.go b/cmd_test.go index 44316756..bd180e8f 100644 --- a/cmd_test.go +++ b/cmd_test.go @@ -121,6 +121,8 @@ func (s *CmdTestSuite) TestGetMcConfigDir(c *C) { c.Assert(dir, Equals, path.Join(u.HomeDir, "mc/")) case "darwin": c.Assert(dir, Equals, path.Join(u.HomeDir, ".mc/")) + case "freebsd": + c.Assert(dir, Equals, path.Join(u.HomeDir, ".mc/")) default: c.Fail() } @@ -137,6 +139,8 @@ func (s *CmdTestSuite) TestGetMcConfigPath(c *C) { c.Assert(dir, Equals, path.Join(mustGetMcConfigDir(), "config.json")) case "darwin": c.Assert(dir, Equals, path.Join(mustGetMcConfigDir(), "config.json")) + case "freebsd": + c.Assert(dir, Equals, path.Join(mustGetMcConfigDir(), "config.json")) default: c.Fail() }