Roger Gonzalez e32f4af296
All checks were successful
Deploy Website / Deploy Hugo Site (push) Successful in 5s
Make build.sh executable
- Change file mode to 100755 to make it executable.
- This allows the build script to be run directly.
- Ensures proper execution of the build process.
2025-05-15 20:53:41 -03:00

12 lines
678 B
Bash
Executable File

#!/bin/bash
find ./ -type f -name '*.png' -not -path '*/.git/*' -exec sh -c 'cwebp -lossless "$1" -o "${1%.png}.webp"' _ {} \;
find ./ -type f -name '*.jpg' -not -path '*/.git/*' -exec sh -c 'cwebp -lossless "$1" -o "${1%.jpg}.webp"' _ {} \;
find ./ -type f -name '*.jpeg' -not -path '*/.git/*' -exec sh -c 'cwebp -lossless "$1" -o "${1%.jpeg}.webp"' _ {} \;
find . -type f -not -path '*/.git/*' -exec sed -i -e 's/\.png/\.webp/g' {} \;
find . -type f -not -path '*/.git/*' -exec sed -i -e 's/\.jpg/\.webp/g' {} \;
find . -type f -not -path '*/.git/*' -exec sed -i -e 's/\.jpeg/\.webp/g' {} \;
hugo -s . -d /var/www/montevideo.restaurant/ --minify --cacheDir $PWD/hugo-cache