This commit is contained in:
Joe Lillibridge 2024-12-04 11:44:03 -06:00
parent 36ef874b89
commit 52a87468a7
No known key found for this signature in database
2 changed files with 22 additions and 21 deletions

View File

@ -7,13 +7,13 @@ set -eu
{% if yadm.os == "Darwin" %} {% if yadm.os == "Darwin" %}
# install homebrew if it's missing # install homebrew if it's missing
if ! command -v brew >/dev/null 2>&1; then if ! command -v brew >/dev/null 2>&1; then
echo "Installing homebrew" echo "Installing homebrew"
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
fi fi
if [ -f "$HOME/.Brewfile" ]; then if [ -f "$HOME/.Brewfile" ]; then
echo "Updating homebrew bundle" echo "Updating homebrew bundle"
brew bundle --global brew bundle --global
fi fi
{% endif %} {% endif %}
@ -61,7 +61,7 @@ packages+=(
"yadm" "yadm"
"zoxide" "zoxide"
"zsh-autosuggestions" "zsh-autosuggestions"
"zsh-syntax-highlighting" # "zsh-syntax-highlighting"
) )
{% endif %} {% endif %}
@ -69,20 +69,20 @@ packages+=(
BOOTSTRAP_D="${BASH_SOURCE[0]}.d" BOOTSTRAP_D="${BASH_SOURCE[0]}.d"
if [[ ! -d "$BOOTSTRAP_D" ]]; then if [[ ! -d "$BOOTSTRAP_D" ]]; then
echo "Error: bootstrap directory '$BOOTSTRAP_D' not found" >&2 echo "Error: bootstrap directory '$BOOTSTRAP_D' not found" >&2
exit 1 exit 1
fi fi
# This will execute all executable files (excluding templates and editor # This will execute all executable files (excluding templates and editor
# backups) in the $BOOTSTRAP_D directory when run. # backups) in the $BOOTSTRAP_D directory when run.
find -L "$BOOTSTRAP_D" -type f | sort | while IFS= read -r bootstrap; do find -L "$BOOTSTRAP_D" -type f | sort | while IFS= read -r bootstrap; do
if [[ -x "$bootstrap" && ! "$bootstrap" =~ "##" && ! "$bootstrap" =~ "~$" ]]; then if [[ -x "$bootstrap" && ! "$bootstrap" =~ "##" && ! "$bootstrap" =~ "~$" ]]; then
if ! "$bootstrap"; then if ! "$bootstrap"; then
echo "Error: bootstrap '$bootstrap' failed" >&2 echo "Error: bootstrap '$bootstrap' failed" >&2
exit 1 exit 1
fi fi
fi fi
done done
hash -r hash -r
@ -95,12 +95,12 @@ npm install --global pure-prompt
YARN=$(brew --prefix yarn)/bin/yarn YARN=$(brew --prefix yarn)/bin/yarn
if (command -v "$YARN" >/dev/null 2>&1); then if (command -v "$YARN" >/dev/null 2>&1); then
# Install yalc. Needed for local-publish # Install yalc. Needed for local-publish
echo "Installing yalc..." echo "Installing yalc..."
if ! $YARN global add yalc; then if ! $YARN global add yalc; then
echo "Failed to install yalc" >&2 echo "Failed to install yalc" >&2
else else
echo "Successfully installed yalc" echo "Successfully installed yalc"
fi fi
fi fi
{% endif %} {% endif %}

View File

@ -8,7 +8,8 @@ export GREP_OPTIONS='--color=auto'
export PATH=$HOME/.local/bin:$PATH export PATH=$HOME/.local/bin:$PATH
export ZDOTDIR=${ZDOTDIR:-$HOME/.config/zsh} export ZDOTDIR=${ZDOTDIR:-$HOME/.config/zsh}
export ZPLUGINDIR=${ZPLUGINDIR:-${ZDOTDIR}/plugins} export ZPLUGINDIR=${ZPLUGINDIR:-${ZDOTDIR}/plugins}
export ZSH_HIGHLIGHT_HIGHLIGHTERS_DIR=/opt/homebrew/share/zsh-syntax-highlighting/highlighters # export ZSH_HIGHLIGHT_HIGHLIGHTERS_DIR=/opt/homebrew/share/zsh-syntax-highlighting/highlighters
export ZSH_HIGHLIGHT_HIGHLIGHTERS_DIR=$ZPLUGINDIR/zsh-syntax-highlighting/highlighters
export NVM_DIR=$HOME/.nvm export NVM_DIR=$HOME/.nvm
[[ "$(command -v bat)" ]] && export PAGER="bat -p" [[ "$(command -v bat)" ]] && export PAGER="bat -p"