AutoYADM commit: 2025-07-19 00:08:39

This commit is contained in:
Daniel Fichtinger 2025-07-19 00:08:39 -04:00
parent a9ba741e32
commit 1d9a2fcf78

View file

@ -12,9 +12,14 @@ provide-module local-kakrc %—
# ensures that the file exists # ensures that the file exists
define-command -hidden local-kakrc-ensure-file %{ define-command -hidden local-kakrc-ensure-file %{
nop %sh{ nop %sh{
if [ ! -f "$kak_opt_local_kakrc_trusted" ]; then file="$kak_opt_local_kakrc_trusted"
mkdir -p "$kak_opt_local_kakrc_trusted" dir="$(dirname "$file")"
touch "$kak_opt_local_kakrc_trusted" if [ ! -f "$file" ]; then
[ ! -d "$dir" ] || mkdir -p "$dir"
base="$(basename "$file")"
# add to gitignore by default
printf '%s\n' "$base" >>"$dir/.gitignore"
touch "$file"
fi fi
} }
} }