papirus-icon-theme/tools/run_on_files.sh

24 lines
396 B
Bash
Raw Normal View History

2016-12-05 16:33:56 -05:00
#!/usr/bin/env bash
#
# usage:
# ./run_on_files.sh FILE...
for file in "$@"; do
# continue if exist
[ -e "$file" ] || continue
# continue if not symlink
[ ! -L "$file" ] || continue
# continue if extension = svg
[ "${file##*.}" == "svg" ] || continue
echo "=> Workon '$file' ..." >&2
# optimize
svgo --config="svgo.yml" -i "$file"
2016-12-05 16:33:56 -05:00
# fix
eval "_fix_color_scheme.sh" "$file"
2016-12-05 16:33:56 -05:00
done