Skip to content

Commit

Permalink
Require 'fortune' program to be installed in $PATH
Browse files Browse the repository at this point in the history
  • Loading branch information
aerth committed Feb 9, 2017
1 parent 3e44640 commit d4638ab
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions add-fortune.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
#!/bin/sh
# double line separated fortunes. some get cut off but oh well.
if [ -z $(which fortune)]; then
echo "fortune program is not in \$PATH"
exit 1
fi

echo "Populating fortunes.txt, press Ctrl C when you think its big enough."
fortune >> fortunes.txt && echo "" >> fortunes.txt;
fortune >> fortunes.txt && echo "" >> fortunes.txt;
Expand Down

0 comments on commit d4638ab

Please sign in to comment.