summaryrefslogtreecommitdiff
path: root/build.sh
diff options
context:
space:
mode:
authorRoger Gonzalez <roger@rogs.me>2023-01-11 08:50:22 -0300
committerRoger Gonzalez <roger@rogs.me>2023-01-11 08:50:22 -0300
commit8bae3c31c4423cf8435930f075d7483e81aa7008 (patch)
tree6567df19785c15c1aefce2bdf53f3ca3e92dfd02 /build.sh
parentba598b1c2fdb720c65acc4e6e6a9b1042a085919 (diff)
Changed webp generation from locally to remotely
Diffstat (limited to 'build.sh')
-rwxr-xr-xbuild.sh5
1 files changed, 5 insertions, 0 deletions
diff --git a/build.sh b/build.sh
new file mode 100755
index 0000000..cefaf9c
--- /dev/null
+++ b/build.sh
@@ -0,0 +1,5 @@
+#!/bin/bash
+
+find ./ -type f -name '*.png' -not -path '*/.git/*' -exec sh -c 'cwebp -lossless $1 -o "${1%.png}.png"' _ {} \;
+find . -type f -not -path '*/.git/*' \( ! -iname ".gitignore" ! -iname "pre-commit" \) -exec sed -i -e 's/\.png/\.png/g' {} \;
+hugo -s . -d /var/www/yams.media/