1#!@POSIX_SHELL@ 2# -*- Shell-script -*- 3 4RLWRAP=rlwrap 5type $RLWRAP > /dev/null 2>&1 6if [ "$?" -ne "0" ]; then 7 echo "$0 error: rmaxima requires rlwrap." >& 1 8 echo "rlwrap is available from <https://github.com/hanslub42/rlwrap>." >& 1 9 exit 1 10fi 11 12 13if [ "@default_layout_autotools@" = "true" ]; then 14 MAXIMA_SHAREDIR="@expanded_datadir@/@PACKAGE@/@VERSION@/share" 15else 16 MAXIMA_SHAREDIR="@expanded_top_srcdir@/share" 17fi 18 19MAXIMA_BUILTINS=$MAXIMA_SHAREDIR/builtins-list.txt 20 21if [ -f "$MAXIMA_BUILTINS" ]; then 22 exec rlwrap --always-readline --complete-filenames --break-chars '(){}[].,*/+-=&^$#@\;|�`:' --file "$MAXIMA_BUILTINS" --remember maxima --disable-readline "$@" 23else 24 echo "$0: failed to locate list of built-in symbols; go ahead without it." 25 echo "$0: (I thought it might be $MAXIMA_BUILTINS but there is no such file.)" 26 exec rlwrap --always-readline --complete-filenames --break-chars '(){}[].,*/+-=&^$#@\;|�`:' --remember maxima --disable-readline "$@" 27fi 28