From a3b0bfe95092f28c813cb958cd8657bd9075cc31 Mon Sep 17 00:00:00 2001 From: mattmcw Date: Sun, 28 Nov 2021 22:25:40 -0500 Subject: [PATCH] script to optimize all svg files with svgsort --- opt.sh | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 opt.sh diff --git a/opt.sh b/opt.sh new file mode 100644 index 0000000..133512c --- /dev/null +++ b/opt.sh @@ -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 \ No newline at end of file