Select cow size from command line
[xcowsay.git] / xcowfortune
1 #!/bin/sh
2
3 #
4 # Display the output of fortune via xcowsay
5 #
6
7 # I run this via a cron job where DISPLAY isn't set
8 if [ "$DISPLAY" = "" ]; then
9     DISPLAY=:0.0
10 fi
11
12 # xcowsay may not be on the PATH...
13 # ...but it should be in the same directory as xcowfortune
14 PATH=$PATH:`dirname $0`
15
16 # fortune is often in /usr/games which may not be on the PATH
17 PATH=$PATH:/usr/games
18
19 exec env PATH=$PATH fortune | env PATH=$PATH DISPLAY=$DISPLAY xcowsay $@