diff options
| author | Eugene Triguba <hello@eugenetriguba.com> | 2025-11-26 09:01:56 -0500 |
|---|---|---|
| committer | Eugene Triguba <hello@eugenetriguba.com> | 2025-11-26 09:01:56 -0500 |
| commit | 1881b5c6cce58a9944bcad2b8c68a1b4efcf77b2 (patch) | |
| tree | 33cdba30255cb9699975b0ffd11d8bc29424aa96 /shlib | |
| parent | Add wallpapers (diff) | |
| download | dotfiles-1881b5c6cce58a9944bcad2b8c68a1b4efcf77b2.zip | |
Add support for openbsd
Diffstat (limited to 'shlib')
| -rw-r--r-- | shlib/bootstrap.sh | 7 | ||||
| -rw-r--r-- | shlib/log.sh | 6 | ||||
| -rw-r--r-- | shlib/os.sh | 4 |
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" ] } |