mirror of
https://github.com/Xevion/dotfiles.git
synced 2025-12-15 08:11:38 -06:00
Standardize hooks, add better key.txt bootstrapper, add update hook to detect --init
This commit is contained in:
7
home/hooks/.update_pre.sh
Executable file
7
home/hooks/.update_pre.sh
Executable file
@@ -0,0 +1,7 @@
|
||||
#!/bin/bash
|
||||
|
||||
# chezmoi update --init does not invoke the 'hooks.init.pre' hook, so we do it ourselves
|
||||
if grep -q 'init' <<<$CHEZMOI_ARGS; then
|
||||
# CHEZMOI_UPDATE is just a hint in case we need to know if we're updating
|
||||
CHEZMOI_UPDATE=1 $(dirname $0)/.init_pre.sh
|
||||
fi
|
||||
Reference in New Issue
Block a user