#!/bin/sh # Find the path to command-line Maple. # If the path below is not right, edit it Maple=/usr/local/maple/bin/maple if [ -x $Maple ] then # found it successfully : elif [ `type -type maple` ] # this will work if it's on the path then Maple=`type -path maple` elif [ -x /usr/bin/maple ] # try some other possibilities then Maple=/usr/bin/maple elif [ -x /usr/local/bin/maple ] then Maple=/usr/local/bin/maple elif [ -x ~/bin/maple ] then Maple=~/bin/maple else echo Where is maple? Edit the file execmws to supply the path. exit fi case "z$2" in z-q) echo 'readlib(makehelp)(foo,`'$1'`);' | $Maple -q | awk '/^>/ {print substr($0,2)}' | $Maple $2 ;; z) echo 'readlib(makehelp)(foo,`'$1'`);' | $Maple -q | awk '/^>/ {print substr($0,2)}' | $Maple $2 ;; * ) echo 'readlib(makehelp)(foo,`'$1'`);' | $Maple -q | awk '/^>/ {print substr($0,2)}' > $2 ;; esac