mirror of
https://github.com/PapirusDevelopmentTeam/papirus-icon-theme.git
synced 2024-10-18 09:10:34 -04:00
25 lines
471 B
Bash
Executable file
25 lines
471 B
Bash
Executable file
#!/usr/bin/env bash
|
|
#
|
|
# usage:
|
|
# ./run_on_files.sh FILE...
|
|
|
|
GIT_ROOT=$(git rev-parse --show-toplevel)
|
|
|
|
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="$GIT_ROOT/tools/svgo.yml" -i "$file"
|
|
|
|
# fix
|
|
eval "$GIT_ROOT/tools/_fix_color_scheme.sh" "$file"
|
|
done
|