aboutsummaryrefslogtreecommitdiff
path: root/dict
blob: 6d58fe9674e8fe09f5f230cbdeed8a501914d97c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#!/bin/bash
#
# Dictionary wrapper.
#

# Parameters
BASENAME="`basename $0`"
DICT="/usr/bin/dict"

# Dispatch
if [ -x "$DICT" ]; then
  $DICT "$@"
else
  if which surfraw &> /dev/null; then
    surfraw wiktionary "$@"
  else
    echo "error: no suitable dictionary found in the system"
    exit 1
  fi
fi