From 79bbd79f4934da51a6ce41dacad1a2d1e44dc860 Mon Sep 17 00:00:00 2001 From: Roger Gonzalez Date: Tue, 10 Jan 2023 19:48:07 -0300 Subject: Fixed gitignore to ignore .png files --- .gitignore | 2 +- pre-commit | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 87f9c74..2a5d5cd 100644 --- a/.gitignore +++ b/.gitignore @@ -17,4 +17,4 @@ hugo.linux # Temporary lock file while building /.hugo_build.lock -*.webp +*.png diff --git a/pre-commit b/pre-commit index 673aa0c..6ea076b 100755 --- a/pre-commit +++ b/pre-commit @@ -3,4 +3,4 @@ set -eo pipefail find ./ -type f -name '*.png' -not -path '*/.git/*' -exec sh -c 'cwebp $1 -o "${1%.png}.webp"' _ {} \; -find . -type f -not -path '*/.git/*' \( ! -iname "pre-commit" \) -exec sed -i -e 's/\.png/\.webp/g' {} \; +find . -type f -not -path '*/.git/*' \( ! -iname ".gitignore" ! -iname "pre-commit" \) -exec sed -i -e 's/\.png/\.webp/g' {} \; -- cgit v1.2.3