23 lines
413 B
Fish
Executable file
23 lines
413 B
Fish
Executable file
#!/usr/bin/fish
|
|
|
|
if ! test $argv
|
|
set -f argv web/app/uploads
|
|
end
|
|
|
|
if type --query gm
|
|
else
|
|
echo -e "GraphicsMagick is missing."
|
|
exit 1
|
|
end
|
|
if type --query cjxl
|
|
else
|
|
echo -e "A JPEGXL encoder (cjxl) is missing."
|
|
exit 1
|
|
end
|
|
if type --query avifenc
|
|
else
|
|
echo -e "An AVIF encoder (avifenc) is missing."
|
|
exit 1
|
|
end
|
|
|
|
fd --glob "**/*.{jpg,jpeg}" $argv[1] -x fish "scripts/optimise-image.fish"
|