fix(scripts): standardize source paths and quoting

- install-composer.sh: use $DOTFILES instead of $HOME/.dotfiles
- install-macos-defaults.sh: use $DOTFILES, replace which with command -v
- install-xcode-cli-tools.sh: quote command substitution
- create-nvim-keymaps.sh: quote $DEST in nvim redir command
This commit is contained in:
2026-02-05 22:53:04 +02:00
parent de773ad68f
commit 81190c051a
4 changed files with 6 additions and 6 deletions

View File

@@ -8,7 +8,7 @@ set -uo pipefail
[ "$(uname)" != "Darwin" ] && echo "Not a macOS system" && exit 0
# shellcheck source=shared.sh
source "$HOME/.dotfiles/config/shared.sh"
source "$DOTFILES/config/shared.sh"
msgr run "Starting to set macOS defaults, these require sudo privileges:"
@@ -24,12 +24,12 @@ while true; do
done 2> /dev/null &
# Skip when shell is fish
if [[ $SHELL != $(which fish) ]]; then
if [[ $SHELL != "$(command -v fish)" ]]; then
msgr nested "Change user shell to zsh if it is available and not the current"
# Change user shell to zsh if not that already.
if hash zsh 2> /dev/null; then
[[ $SHELL != $(which zsh) ]] && chsh -s "$(which zsh)"
[[ $SHELL != "$(command -v zsh)" ]] && chsh -s "$(command -v zsh)"
fi
fi