script to optimize all svg files with svgsort

This commit is contained in:
Matt McWilliams 2021-11-28 22:25:40 -05:00
parent fe1418561c
commit a3b0bfe950
1 changed files with 11 additions and 0 deletions

11
opt.sh Normal file
View File

@ -0,0 +1,11 @@
source ./common.sh
if [[ "${1}" == "" ]]; then
echo "Please provide a directory as the first argument"
exit 1
fi
for svg in "${1}"*.svg ; do
mv "${svg}" "${svg}.unopt.svg"
svgsort "${svg}.unopt.svg" "${svg}"
done