svg2png (257B)
1 #! /usr/bin/env nix-shell 2 #! nix-shell -i bash -p inkscape 3 4 usage () { 5 printf "usage: svg2png file.svg <width> [height]\n" 6 exit 1 7 } 8 9 png="${1%.svg}.png" 10 [ -z "$1" ] || [ -z "$2" ] && usage 11 height=${3:-$2} 12 inkscape -z -e "$png" -w "$2" -h "$height" "$1"