mirror of
https://github.com/msfjarvis/msfjarvis.dev.git
synced 2024-06-03 04:18:56 +05:30
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
Block a user