Files
dotfiles/.chezmoihooks/pre-read-source-state.sh
2025-11-13 00:26:19 +02:00

14 lines
331 B
Bash
Executable File

#!/usr/bin/env bash
# Pre-read-source-state hook for chezmoi
# This runs before chezmoi reads the source state
set -e
DOTFILES="${CHEZMOI_SOURCE_DIR:-$HOME/.local/share/chezmoi}"
# Update git submodules if they exist
if [ -d "$DOTFILES/.git" ]; then
cd "$DOTFILES"
git submodule update --init --recursive --quiet || true
fi