Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ See README.md for the complete overview. Key points for Claude:

- See `tools/@new` for an example of the files in each folder
- See `tools/README.md` for an explanation of the feature folder approach
- For brew formulae without config, see `tools/eza/` or `tools/logcli/` as examples

### Symlink Management

Expand Down
14 changes: 14 additions & 0 deletions tools/logcli/install.bash
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#!/usr/bin/env bash
set -euo pipefail

source "${DOTFILES}/features/install/utils.bash"
source "${DOTFILES}/tools/logcli/utils.bash" # source last to avoid env var overrides

install_and_symlink \
"${TOOL_LOWER}" \
"${TOOL_UPPER}" \
"${TOOL_COMMAND}" \
"${TOOL_EMOJI}" \
"brew install --formula ${TOOL_PACKAGE}" \
"brew list --version ${TOOL_PACKAGE}" \
"parse_version"
12 changes: 12 additions & 0 deletions tools/logcli/uninstall.bash
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/usr/bin/env bash
set -euo pipefail

source "${DOTFILES}/features/uninstall/utils.bash"
source "${DOTFILES}/tools/logcli/utils.bash" # source last to avoid env var overrides

uninstall_and_unlink \
"${TOOL_LOWER}" \
"${TOOL_UPPER}" \
"${TOOL_COMMAND}" \
"${TOOL_EMOJI}" \
"brew uninstall --formula ${TOOL_PACKAGE}"
15 changes: 15 additions & 0 deletions tools/logcli/update.bash
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#!/usr/bin/env bash
set -euo pipefail

source "${DOTFILES}/features/update/utils.bash"
source "${DOTFILES}/tools/logcli/utils.bash" # source last to avoid env var overrides

update_and_symlink \
"${TOOL_LOWER}" \
"${TOOL_UPPER}" \
"${TOOL_COMMAND}" \
"${TOOL_EMOJI}" \
"brew upgrade --formula ${TOOL_PACKAGE}" \
"brew list --version ${TOOL_PACKAGE}" \
"parse_version" \
"${DOTFILES}/tools/${TOOL_LOWER}/install.bash"
17 changes: 17 additions & 0 deletions tools/logcli/utils.bash
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#!/usr/bin/env bash
set -euo pipefail

export TOOL_LOWER="logcli"
export TOOL_UPPER="LogCLI"
export TOOL_COMMAND="logcli"
export TOOL_PACKAGE="logcli"
export TOOL_EMOJI="πŸ“Š"
export TOOL_CONFIG_DIR="${HOME}/.config/${TOOL_LOWER}"

parse_version() {
local raw_version="${1}"
local prefix_brew_formula="${TOOL_PACKAGE} "

# Everything after the prefix
printf "${raw_version#"${prefix_brew_formula}"}"
}