From 8c3c49fd56de185396400a0e8a636ac03d8239ab Mon Sep 17 00:00:00 2001 From: Norbert Preining Date: Mon, 12 Feb 2018 14:52:54 +0900 Subject: update ketcindy --- texmf-dist/scripts/ketcindy/ketcindy.sh | 38 +++++++++++++++++++++++++++------ 1 file changed, 32 insertions(+), 6 deletions(-) (limited to 'texmf-dist/scripts/ketcindy/ketcindy.sh') diff --git a/texmf-dist/scripts/ketcindy/ketcindy.sh b/texmf-dist/scripts/ketcindy/ketcindy.sh index fe8f8155..23465f4b 100755 --- a/texmf-dist/scripts/ketcindy/ketcindy.sh +++ b/texmf-dist/scripts/ketcindy/ketcindy.sh @@ -7,7 +7,8 @@ # BinaryName=Cinderella2 -TemplateFile=template.cdy +TemplateFile=template1basic.cdy +systype=`uname` if [ "$1" = "-c" ] then @@ -19,8 +20,21 @@ fi if [ -z "$cinderella" ] then - echo "Cannot find $BinaryName!" >&2 - exit 1 + case $systype in + Darwin) + if [ -r /Applications/Cinderella2.app/Contents/MacOS/Cinderella2 ] + then + cinderella=/Applications/Cinderella2.app/Contents/MacOS/Cinderella2 + else + echo "Cannot find $BinaryName!" >&2 + exit 1 + fi + ;; + *) + echo "Cannot find $BinaryName!" >&2 + exit 1 + ;; + esac fi if [ ! -x "$cinderella" ] ; then @@ -30,7 +44,13 @@ fi # find real path realcind=`realpath "$cinderella"` cinddir=`dirname "$realcind"` -plugindir="$cinddir/Plugins" +case $systype in + Darwin) + plugindir="$cinddir/../PlugIns";; + *) + plugindir="$cinddir/Plugins";; +esac + plugin="$plugindir/KetCindyPlugin.jar" # find Jar @@ -56,8 +76,14 @@ if [ ! -r "$plugin" ] ; then fi # check whether the .jar md5sum is fine, but don't make this an error -myjarmd=`cat "$KetCdyJar" | md5sum` -sysjarmd=`cat "$plugin" | md5sum` +case $systype in + Darwin) + __md5sum=md5;; + *) + __md5sum=md5sum;; +esac +myjarmd=`cat "$KetCdyJar" | $__md5sum` +sysjarmd=`cat "$plugin" | $__md5sum` if [ ! "$myjarmd" = "$sysjarmd" ] then echo "The installed version of the plugin in" -- cgit v1.2.3