#!/bin/sh -e# you need gs-common, pstoedit and skencil to# get this script workingBASENAME=$(basename"$1";echox)BASENAME=${BASENAME%x}# Outline fonts
eps2eps-dNOCACHE"$1""${BASENAME}".ps2svg.ps
# Fix bounding box
ps2epsi"${BASENAME}".ps2svg.ps"${BASENAME}".ps
rm"${BASENAME}".ps2svg.ps
# Convert to Sketch
pstoedit-fsk"${BASENAME}".ps"${BASENAME}".sk
# Convert to SVG
skconvert"${BASENAME}".sk"${BASENAME}".svg
# You can also make the whole thing a big long pipe and eliminate the use of tmp files.