#!/bin/bash # Executes a staapl dictionary script. DICT="$1" DIR=$HOME/staapl/staapl/app if [ -z "$DICT" ]; then # If Take the most recent file in current directory or app dir. DICT=$(ls -t *.dict 2>/dev/null| head -n 1) if [ -z "$DICT" ]; then cd $DIR echo "Trying app dir $DIR" DICT=$(ls -t *.dict | head -n 1) if [ -z "$DICT" ]; then echo "Can't find a .dict file" exit 1 fi fi echo Guessing most recent $DICT fi racket $DICT