From 667b411b9f40c074a9046a73528033b494323eb6 Mon Sep 17 00:00:00 2001 From: leath-dub Date: Sun, 9 Jun 2024 10:35:16 +0100 Subject: [PATCH] feat: preliminary freebsd support --- CHANGELOG.md | 1 + execfile_unix.go | 2 +- job_unix.go | 2 +- signal_unix.go | 2 +- vars_freebsd.go | 21 +++++++++++++++++++++ 5 files changed, 25 insertions(+), 3 deletions(-) create mode 100644 vars_freebsd.go diff --git a/CHANGELOG.md b/CHANGELOG.md index e6eeed8..c53ff4b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -30,6 +30,7 @@ hilbish.run('wc -l', { ### Fixed - Fix ansi attributes causing issues with text when cut off in greenhouse +- Fix not compiling on freebsd ## [2.2.3] - 2024-04-27 ### Fixed diff --git a/execfile_unix.go b/execfile_unix.go index 44f924a..fd83f56 100644 --- a/execfile_unix.go +++ b/execfile_unix.go @@ -1,4 +1,4 @@ -// +build linux darwin +// +build unix package main diff --git a/job_unix.go b/job_unix.go index 5029012..8482294 100644 --- a/job_unix.go +++ b/job_unix.go @@ -1,4 +1,4 @@ -// +build darwin linux +// +build unix package main diff --git a/signal_unix.go b/signal_unix.go index 2e6c885..921c4b8 100644 --- a/signal_unix.go +++ b/signal_unix.go @@ -1,4 +1,4 @@ -// +build darwin linux +// +build unix package main diff --git a/vars_freebsd.go b/vars_freebsd.go new file mode 100644 index 0000000..cc1cb93 --- /dev/null +++ b/vars_freebsd.go @@ -0,0 +1,21 @@ +// +build freebsd + +package main + +// String vars that are free to be changed at compile time +var ( + requirePaths = commonRequirePaths + `.. ';' + .. hilbish.dataDir .. '/libs/?/init.lua;' + .. hilbish.dataDir .. '/libs/?/?.lua;'` + freebsdUserPaths + freebsdUserPaths = ` + .. hilbish.userDir.data .. '/hilbish/libs/?/init.lua;' + .. hilbish.userDir.data .. '/hilbish/libs/?/?.lua;' + .. hilbish.userDir.data .. '/hilbish/libs/?.lua;' + .. hilbish.userDir.config .. '/hilbish/?/init.lua;' + .. hilbish.userDir.config .. '/hilbish/?/?.lua;' + .. hilbish.userDir.config .. '/hilbish/?.lua'` + dataDir = "/usr/local/share/hilbish" + preloadPath = dataDir + "/nature/init.lua" + sampleConfPath = dataDir + "/.hilbishrc.lua" // Path to default/sample config + defaultConfDir = "" +)