From a5cf2d3b47cdd5c57d5be23972311cee962ebb33 Mon Sep 17 00:00:00 2001 From: DarkFeather Date: Mon, 15 Dec 2025 10:06:06 -0600 Subject: [PATCH] Updated strategy for data files --- Hooks/scripts.d/find-data-files | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/Hooks/scripts.d/find-data-files b/Hooks/scripts.d/find-data-files index b454d26..2c54683 100755 --- a/Hooks/scripts.d/find-data-files +++ b/Hooks/scripts.d/find-data-files @@ -1,10 +1,11 @@ #!/bin/bash # We don't want to commit data files, with the exceptions being our GPG public key and organization logo in PNG & ASCII format. -result="$(git ls-files | xargs -n 1 file | grep -Ev ASCII\ text\|JSON\|empty\|Unicode\ text | grep -vE '^Resources/logo.png|^Resources/ascii.txt|^Resources/public.gpg')" -if [ -n "$result" ]; then - echo "These files need to be evaluated -- generally, don't commit data files to Git." - echo "$result" - exit 1 -fi +for file in `git ls-files | xargs -n 1 file | grep -Ev 'ASCII text|JSON|empty|Unicode text|symbolic link' | grep -vE '^Resources/logo.png|^Resources/ascii.txt|^Resources/public.gpg' | cut -f 1 -d :`; do + if [ "$(du -k "${file}" | awk '{ print $1; }')" -gt 10 ]; then + echo "These files need to be evaluated -- generally, don't commit data files to Git." + echo "$result" + exit 1 + fi +done exit 0