mirror of
https://github.com/ivuorinen/dotfiles.git
synced 2026-03-02 04:55:12 +00:00
feat(scripts): add shellspec installation to dfm
Add install-shellspec.sh script that clones shellspec to ~/.cache/shellspec and installs via make to ~/.local/bin. Wire it into dfm install menu and the Tier 4 install-all pipeline.
This commit is contained in:
@@ -88,6 +88,7 @@ section_install()
|
||||
"nvm-latest:Install latest lts node using nvm"
|
||||
"nvm:Install Node Version Manager (nvm)"
|
||||
"python-packages:Install Python packages via uv"
|
||||
"shellspec:Install shellspec testing framework"
|
||||
"xcode-cli-tools:Install Xcode CLI tools (macOS)"
|
||||
"z:Install z"
|
||||
)
|
||||
@@ -121,6 +122,7 @@ section_install()
|
||||
$0 install ntfy
|
||||
|
||||
# Tier 4: Independent utilities
|
||||
$0 install shellspec
|
||||
$0 install z
|
||||
|
||||
msgr msg "Reloading configurations again..."
|
||||
@@ -245,6 +247,12 @@ section_install()
|
||||
&& msgr yay "Xcode CLI tools installed!"
|
||||
;;
|
||||
|
||||
shellspec)
|
||||
msgr run "Installing shellspec..."
|
||||
bash "$DOTFILES/scripts/install-shellspec.sh" \
|
||||
&& msgr yay "shellspec has been installed!"
|
||||
;;
|
||||
|
||||
z)
|
||||
msgr run "Installing z..."
|
||||
bash "$DOTFILES/scripts/install-z.sh" \
|
||||
|
||||
32
scripts/install-shellspec.sh
Executable file
32
scripts/install-shellspec.sh
Executable file
@@ -0,0 +1,32 @@
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
# @description Install shellspec testing framework
|
||||
#
|
||||
# shellcheck source=shared.sh
|
||||
source "${DOTFILES}/config/shared.sh"
|
||||
|
||||
SHELLSPEC_REPO="https://github.com/shellspec/shellspec.git"
|
||||
SHELLSPEC_CACHE="$HOME/.cache/shellspec"
|
||||
|
||||
install_shellspec()
|
||||
{
|
||||
if [[ -d "$SHELLSPEC_CACHE" ]]; then
|
||||
msgr ok "shellspec repo already cloned, pulling latest..."
|
||||
git -C "$SHELLSPEC_CACHE" pull --quiet
|
||||
else
|
||||
git clone --depth 1 "$SHELLSPEC_REPO" "$SHELLSPEC_CACHE"
|
||||
fi
|
||||
|
||||
msgr run "Running make install..."
|
||||
make -C "$SHELLSPEC_CACHE" install PREFIX="$HOME/.local"
|
||||
msgr run_done "shellspec installed to $HOME/.local/bin/shellspec"
|
||||
return 0
|
||||
}
|
||||
|
||||
main()
|
||||
{
|
||||
install_shellspec
|
||||
return 0
|
||||
}
|
||||
|
||||
main "$@"
|
||||
Reference in New Issue
Block a user