Skip to content

Instantly share code, notes, and snippets.

@wes-goulet
Created November 9, 2017 18:45
Show Gist options
  • Save wes-goulet/6f2573e5e430f3ea9aacb89547020f15 to your computer and use it in GitHub Desktop.
Save wes-goulet/6f2573e5e430f3ea9aacb89547020f15 to your computer and use it in GitHub Desktop.
Converts all .svg files to .pdf files using Inkscape in the current directory
#! /usr/bin/env bash
svgFiles=$(ls -d -1 $PWD/*.svg)
for file in $svgFiles
do
pdfName=${file/".svg"/".pdf"}
echo "Converting $file to $pdfName"
/Applications/Inkscape.app/Contents/Resources/bin/inkscape --without-gui --file=$file --export-pdf=$pdfName
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment