mirror of
https://github.com/ivuorinen/dotfiles.git
synced 2026-02-06 12:50:03 +00:00
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:
@@ -16,7 +16,7 @@ main()
|
||||
printf "\`\`\`txt"
|
||||
} > "$DEST"
|
||||
|
||||
nvim -c "redir! >> $DEST" -c 'silent verbose map' -c 'redir END' -c 'q'
|
||||
nvim -c "redir! >> \"$DEST\"" -c 'silent verbose map' -c 'redir END' -c 'q'
|
||||
|
||||
printf "\n\`\`\`\n\n- Generated on %s\n" "$(date)" >> "$DEST"
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@ set -euo pipefail
|
||||
# @description Install PHP Package Manager Composer
|
||||
#
|
||||
# shellcheck source="shared.sh"
|
||||
source "$HOME/.dotfiles/config/shared.sh"
|
||||
source "$DOTFILES/config/shared.sh"
|
||||
|
||||
if ! command -v php &> /dev/null; then
|
||||
msg_err "PHP Not Available, cannot install composer"
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -32,7 +32,7 @@ keep_alive_sudo()
|
||||
done 2> /dev/null &
|
||||
}
|
||||
|
||||
XCODE_TOOLS_PATH=$(xcode-select -p)
|
||||
XCODE_TOOLS_PATH="$(xcode-select -p)"
|
||||
XCODE_SWIFT_PATH="$XCODE_TOOLS_PATH/usr/bin/swift"
|
||||
|
||||
# Function to prompt for XCode CLI Tools installation
|
||||
|
||||
Reference in New Issue
Block a user