]> git.pld-linux.org Git - packages/fortune-mod.git/commitdiff
- skip fortune displays on non-interactive shells (cron for example)
authorElan Ruusamäe <glen@pld-linux.org>
Wed, 12 Apr 2006 21:45:43 +0000 (21:45 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    fortune-mod.csh -> 1.3

fortune-mod.csh

index daeb8d07a73a7f636992cceff998a8643fdcb2b3..c9fdedc2e15de34f4910869c5b2fecf831a54ed9 100644 (file)
@@ -1,3 +1,8 @@
-echo
-fortune -s
-echo
+#!/bin/csh
+
+tty -s
+if ($status == 0) then
+       echo
+       fortune -s
+       echo
+endif
This page took 0.128147 seconds and 4 git commands to generate.