#!/bin/bash

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