fix script
This commit is contained in:
parent
8b8a84e70e
commit
9fcf30ea03
|
@ -1,6 +1,13 @@
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
set -euxo pipefail
|
set -euo pipefail
|
||||||
|
|
||||||
fd -tf png$ static/uploads -x cwebp -lossless -mt {} -o {.}.webp
|
function convert_to_webp() {
|
||||||
fd -tf png$ static/uploads -X rm -v
|
local DIR
|
||||||
|
DIR="${1}"
|
||||||
|
fd -tf png$ "${DIR:?}" -x cwebp -lossless -mt {} -o '{.}.webp'
|
||||||
|
fd -tf png$ "${DIR:?}" -X rm -v
|
||||||
|
}
|
||||||
|
|
||||||
|
convert_to_webp static/uploads
|
||||||
|
convert_to_webp content/posts
|
||||||
|
|
Loading…
Reference in New Issue