Skip to content

Commit 960e025

Browse files
committed
🛠 fix: zsh
1 parent 26f30e3 commit 960e025

2 files changed

Lines changed: 13 additions & 3 deletions

File tree

scripts/debian-zsh.sh

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
#!/bin/bash
22
set -euo pipefail
33

4+
MISE_DIR="${XDG_CONFIG_HOME}/mise"
5+
trap 'unset ZSH_BIN USER_SHELL MISE_DIR' EXIT
6+
47
# Install Zsh
58
echo "Installing Zsh..."
69
sudo apt-get update
@@ -22,4 +25,7 @@ if [ -f "${HOME}/.zshenv" ]; then
2225
echo "Warning: existing .zshenv found, backed up to .zshenv.bk"
2326
fi
2427
ln -sf .dotfiles/zsh/.zshenv "${HOME}/.zshenv"
25-
stow --no-folding --target "${XDG_CONFIG_HOME}/mise" 'mise'
28+
29+
# Install mise dotfiles
30+
mkdir -p "${MISE_DIR}"
31+
stow --no-folding --target "${MISE_DIR}" 'mise'

scripts/macos-zsh.sh

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@ set -euo pipefail
33

44
ZSH_BIN="${HOMEBREW_PREFIX}/bin/zsh" # Homebrew zsh
55
USER_SHELL=$(dscl . -read "${HOME}" UserShell | awk '{print $2}')
6-
trap 'unset ZSH_BIN USER_SHELL' EXIT
6+
MISE_DIR="${XDG_CONFIG_HOME}/mise"
7+
trap 'unset ZSH_BIN USER_SHELL MISE_DIR' EXIT
78

89
# Skip if running in CI
910
if [ -n "${CI:-}" ]; then
@@ -27,4 +28,7 @@ fi
2728
echo "Installing zsh dotfiles..."
2829
mkdir -p "${HOME}/.config" # Make sure XDG_CONFIG_HOME exists
2930
ln -sf .dotfiles/zsh/.zshenv "${HOME}/.zshenv"
30-
stow --no-folding --target "${XDG_CONFIG_HOME}/mise" 'mise'
31+
32+
# Install mise dotfiles
33+
mkdir -p "${MISE_DIR}"
34+
stow --no-folding --target "${MISE_DIR}" 'mise'

0 commit comments

Comments
 (0)