summaryrefslogtreecommitdiffstatshomepage
path: root/run_before_canonical-nvim-lock.sh.tmpl
blob: 3aa3606ef3d2217a7fddabbd93a0da72ceb4a55b (plain) (blame)
1
2
3
4
5
6
7
8
9
{{ if eq (default "host" (index . "machineRole")) "canonical" -}}
#!/bin/sh
set -eu
target="${XDG_CONFIG_HOME:-$HOME/.config}/nvim/nvim-pack-lock.json"
if [ ! -e "$target" ] && [ ! -L "$target" ]; then
  mkdir -p "$(dirname "$target")"
  cp {{ printf "%s/dot_config/nvim/nvim-pack-lock.json" .chezmoi.sourceDir | quote }} "$target"
fi
{{ end -}}