From 3276e4eea2bf85fc5496a6f77237ab1bde2d03f9 Mon Sep 17 00:00:00 2001 From: nick Date: Tue, 4 Mar 2008 19:20:06 +0000 Subject: [PATCH] xcowfortune add git-svn-id: http://svn.nickg.me.uk/work/xcowsay@280 a97b1542-0b21-0410-a459-e47997c36f34 --- configure.ac | 2 +- xcowat | 2 +- xcowfortune | 21 +++++++++++++++++++++ 3 files changed, 23 insertions(+), 2 deletions(-) create mode 100755 xcowfortune diff --git a/configure.ac b/configure.ac index 471c3f2..137b0e3 100644 --- a/configure.ac +++ b/configure.ac @@ -1,4 +1,4 @@ -AC_INIT([xcowsay], [0.4], +AC_INIT([xcowsay], [0.4.1], [Nick Gasson ], [xcowsay]) AM_INIT_AUTOMAKE([-Wall]) diff --git a/xcowat b/xcowat index 539188a..fb0fe0f 100755 --- a/xcowat +++ b/xcowat @@ -5,7 +5,7 @@ # # Might not have a display -if [ "$DISPLAY" == "" ]; then +if [ "$DISPLAY" = "" ]; then export DISPLAY=:0.0 fi diff --git a/xcowfortune b/xcowfortune new file mode 100755 index 0000000..06d6378 --- /dev/null +++ b/xcowfortune @@ -0,0 +1,21 @@ +#!/bin/sh + +# +# Display the output of fortune via xcowsay +# + +# I run this via a cron job where DISPLAY isn't set +if [ "$DISPLAY" = "" ]; then + export DISPLAY=:0.0 +fi + +# xcowsay may not be on the PATH... +# ...but it should be in the same directory as xcowfortune +PATH=$PATH:`dirname $0` + +# fortune is often in /usr/games which may not be on the PATH +PATH=$PATH:/usr/games + +export PATH + +exec env fortune | env xcowsay -- 2.39.2