From 3d1eef0eb021ccb7be48e15e8b92147162d52034 Mon Sep 17 00:00:00 2001 From: Brian Zalewski Date: Tue, 10 Jan 2023 00:17:40 +0000 Subject: [PATCH] Update file run_after_ensure-executable.tmpl --- .../template/hooks/run_after_ensure-executable.tmpl | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 home/private_dot_config/git/template/hooks/run_after_ensure-executable.tmpl diff --git a/home/private_dot_config/git/template/hooks/run_after_ensure-executable.tmpl b/home/private_dot_config/git/template/hooks/run_after_ensure-executable.tmpl new file mode 100644 index 00000000..0240e364 --- /dev/null +++ b/home/private_dot_config/git/template/hooks/run_after_ensure-executable.tmpl @@ -0,0 +1,13 @@ +{{- if eq .host.distro.family "linux" }} +#!/usr/bin/env bash + +{{ includeTemplate "universal/profile" }} +{{ includeTemplate "universal/logg" }} + +### Ensure ~/.config/git/template/hooks files are executable +logg info 'Ensuring '"$XDG_CONFIG_HOME"'/git/template/hooks files are executable' +find "$XDG_CONFIG_HOME/git/template/hooks" -mindepth 1 -maxdepth 1 -type f | while read HOOK; do + chmod +x "$HOOK" +done + +{{ end -}}