summaryrefslogtreecommitdiff
path: root/texmf-dist/scripts
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2017-10-12 14:38:48 +0900
committerNorbert Preining <norbert@preining.info>2017-10-12 14:38:48 +0900
commitc3c9858282c6566a6cf0e6036a0993c356672ed3 (patch)
tree8ad5f422884c6a7a9811da8153fd6deaf6f59d4b /texmf-dist/scripts
parent10b9268179c14421f0c1b330a783f5c5ffc28ae3 (diff)
add ketcindy starter
Diffstat (limited to 'texmf-dist/scripts')
-rwxr-xr-xtexmf-dist/scripts/ketpic/ketcindy.sh38
1 files changed, 38 insertions, 0 deletions
diff --git a/texmf-dist/scripts/ketpic/ketcindy.sh b/texmf-dist/scripts/ketpic/ketcindy.sh
new file mode 100755
index 00000000..344cbb23
--- /dev/null
+++ b/texmf-dist/scripts/ketpic/ketcindy.sh
@@ -0,0 +1,38 @@
+#!/bin/sh
+#
+# KETCindy starter script
+#
+
+BinaryName=Cinderella2
+TemplateFile=template.cdy
+
+if [ "$1" = "-c" ]
+then
+ shift
+ cinderella="$1"
+else
+ cinderella=`which $BinaryName 2>/dev/null`
+fi
+
+if [ -z "$cinderella" ]
+then
+ echo "Cannot find $BinaryName!" >&2
+ exit 1
+fi
+
+if [ ! -x "$cinderella" ] ; then
+ echo "Program $cinderella is not executable!" >&2
+ exit 1
+fi
+
+# search for template.cdy
+TempCdy=`kpsewhich -format=texmfscripts $TemplateFile`
+
+if [ -z "$TempCdy" ]
+then
+ echo "Cannot find $TemplateFile via kpsewhich, is ketpic installed?" >&2
+ exit 1
+fi
+
+exec "$cinderella" "$TempCdy"
+