aboutsummaryrefslogtreecommitdiff
path: root/dotfiles/.local/bin/svgtopdf
diff options
context:
space:
mode:
Diffstat (limited to 'dotfiles/.local/bin/svgtopdf')
-rwxr-xr-xdotfiles/.local/bin/svgtopdf9
1 files changed, 9 insertions, 0 deletions
diff --git a/dotfiles/.local/bin/svgtopdf b/dotfiles/.local/bin/svgtopdf
new file mode 100755
index 0000000..f59bd98
--- /dev/null
+++ b/dotfiles/.local/bin/svgtopdf
@@ -0,0 +1,9 @@
+#!/bin/sh
+
+file=$(readlink -f "$1")
+dir=$(dirname "$file")
+base="${file%.*}"
+
+cd "$dir" || exit
+
+inkscape -z -D --file="$file" --export-pdf="$base.pdf"