diff --git a/src/xmb/convert.sh b/src/xmb/convert.sh new file mode 100755 index 000000000..36f2202df --- /dev/null +++ b/src/xmb/convert.sh @@ -0,0 +1,31 @@ +#!/bin/sh + +# MonoChrome SVG to PNG Converter +# +# Will update the given icon from its SVG to its PNG. +# +# Requires Inkscape to be installed. +# +# ./convert.sh THEME ICON +# +# Parameters +# - THEME (optional) Which theme to act on. +# - ICON (optional) Which icon to conver from an SVG to a PNG. +# +# If the parameters are not provided, it will process all images. +# +# Example +# +# ./convert.sh monochrome battery-full +# ./convert.sh flatui DOS +# ./convert.sh + +if [ -z "$1" ]; then + for theme in $(find . -type d -not -path . -printf "%f\n"); do + for image in $theme/*.svg; do + ./convert.sh $theme "$(basename "$image" .svg)" + done + done +else + inkscape -z -e "../../xmb/$1/png/$2.png" -w 256 -h 256 "$1/$2.svg" +fi; diff --git a/xmb/convert.sh b/xmb/convert.sh deleted file mode 100755 index 8718c22c9..000000000 --- a/xmb/convert.sh +++ /dev/null @@ -1,20 +0,0 @@ -#!/bin/sh - -# MonoChrome SVG to PNG Converter -# -# Will update the given icon from its SVG to its PNG. -# -# Requires Inkscape to be installed. -# -# ./convert.sh THEME ICON -# -# Parameters -# - THEME Which theme to act on. -# - ICON Which icon to conver from an SVG to a PNG. -# -# Example -# -# ./convert.sh monochrome battery-full -# ./convert.sh flatui DOS - -inkscape -z -e "$1/png/$2.png" -w 256 -h 256 "$1/src/$2.svg"