aboutsummaryrefslogtreecommitdiffstats
path: root/shlib
diff options
context:
space:
mode:
authorEugene Triguba <hello@eugenetriguba.com>2025-11-26 09:01:56 -0500
committerEugene Triguba <hello@eugenetriguba.com>2025-11-26 09:01:56 -0500
commit1881b5c6cce58a9944bcad2b8c68a1b4efcf77b2 (patch)
tree33cdba30255cb9699975b0ffd11d8bc29424aa96 /shlib
parentAdd wallpapers (diff)
downloaddotfiles-1881b5c6cce58a9944bcad2b8c68a1b4efcf77b2.zip
Add support for openbsd
Diffstat (limited to 'shlib')
-rw-r--r--shlib/bootstrap.sh7
-rw-r--r--shlib/log.sh6
-rw-r--r--shlib/os.sh4
3 files changed, 9 insertions, 8 deletions
diff --git a/shlib/bootstrap.sh b/shlib/bootstrap.sh
index b2d6bb9..7db72ea 100644
--- a/shlib/bootstrap.sh
+++ b/shlib/bootstrap.sh
@@ -17,13 +17,14 @@ bootstrap_macos() {
fi
log_info "Found homebrew installation. Installing Brewfile.."
- (cd homebrew && brew bundle)
+ (cd macos/homebrew && brew bundle)
log_info "Brewfile successfully installed. Moving to linking dotfiles.."
sudo ln -sf "$HOME/bin/get-password" /usr/local/bin/get-password
sudo ln -sf "$(which op)" /usr/local/bin/op
}
-bootstrap_linux() {
- return 0
+bootstrap_openbsd() {
+ log_info "Installing OpenBSD packages..."
+ doas pkg_add "$(dirname "$0")/pkg/openbsd-packages.txt" | tr '\n' ' '
}
diff --git a/shlib/log.sh b/shlib/log.sh
index 3fcf758..f4e46ff 100644
--- a/shlib/log.sh
+++ b/shlib/log.sh
@@ -1,5 +1,5 @@
-# shellcheck shell=bash
-[[ -n "${DOTFILES_LOG_LOADED:-}" ]] && return
+# shellcheck shell=sh
+[ -n "${DOTFILES_LOG_LOADED:-}" ] && return
readonly DOTFILES_LOG_LOADED=1
log_info() {
@@ -19,7 +19,7 @@ log_success() {
}
log_debug() {
- [[ "${DEBUG:-}" == "true" ]] && echo "[DEBUG] $*" >&2
+ [ "${DEBUG:-}" == "true" ] && echo "[DEBUG] $*" >&2
}
log_newline() {
diff --git a/shlib/os.sh b/shlib/os.sh
index 1ac4f04..9c3b62c 100644
--- a/shlib/os.sh
+++ b/shlib/os.sh
@@ -10,6 +10,6 @@ os_is_macos() {
[ "$(os_print)" = "Darwin" ]
}
-os_is_linux() {
- [ "$(os_print)" = "Linux" ]
+os_is_openbsd() {
+ [ "$(os_print)" = "OpenBSD" ]
}