/usr/games/spruch is in fortunes-de 0.31-1.
This file is owned by root:root, with mode 0o755.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 | #!/bin/sh
FORTUNEPATH=/usr/games/
DATAPATH=/usr/share/games/fortunes
FORTUNE=${FORTUNEPATH}fortune
SCRIPT=`echo $0 | sed "s/^.*\/\([^\\]*\)/\1/"`
if [ _${SCRIPT}_ != _spruch_ -a _${SCRIPT}_ != _fortune_ ] ; then
DB=/${SCRIPT}
fi
lang=$(locale 2>/dev/null | sed -ne 's/"$//;s/^LC_MESSAGES="\?//p')
[ -e /etc/locale.alias ] && l=$(sed -ne "s/^$(echo $lang | sed 's/\(\.\|\^\|\$\|\*\|\[\)/\\\1/g')[ ]\+//ip" /etc/locale.alias)
[ -n "$l" ] && lang="$l"
# check for the currently used charmap
charmap=$(locale 2>/dev/null -k LC_CTYPE | sed -ne 's/^charmap="\([^"]*\)"$/\1/p')
# if there are any parameters check for given file name
found=0
if [ $# -gt 0 ] ; then
for par in "$@" ; do
if [ $found -eq 0 ] ; then
if [ -e "$par" ] ; then
DBPATH="$par"
found=1
fi
if [ -e "${DATAPATH}/$par" ] ; then
DBPATH="${DATAPATH}/$par"
found=1
fi
fi
done
fi
if [ $found -eq 0 ] ; then
DBPATH="${DATAPATH}/de${DB}"
fi
if [ ! -d ${DBPATH} ] ; then
if [ ! -e ${DBPATH}.dat ] ; then
echo "Database ${DBPATH} not installed. Please try"
echo " dpkg-reconfigure fortunes-de"
echo "to install more databases."
exit
fi
fi
if [ X"$1" = X"-x" ] ; then
FORTUNE="${FORTUNE} ${DBPATH}"
shift
else
case "$lang" in
de*)
FORTUNE="${FORTUNE} ${DBPATH}"
;;
esac
fi
$FORTUNE "$@"
|