summaryrefslogtreecommitdiff
path: root/pre-commit
blob: b2a2042a83cbb974da605c5b233eaf35ec92d9f4 (plain)
1
2
3
4
5
6
#!/bin/sh
#
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/*' -exec sed -i -e 's/\.png/\.webp/g' {} \;