bsd-games: fix countmail.

This commit is contained in:
Leah Neukirchen 2017-07-12 12:11:05 +02:00
parent 578b091d34
commit 510fb688eb
2 changed files with 33 additions and 2 deletions

View file

@ -0,0 +1,31 @@
--- bsd-games-2.17/countmail/countmail.orig
+++ bsd-games-2.17/countmail/countmail
@@ -39,27 +39,7 @@
# Count the messages in your mailbox, using only POSIX shell builtins.
#
-# Caveats:
-#
-# The read loop is horrendously slow on every implementation I've
-# tried. I suggest using from(1) and wc(1) instead, though these are
-# not shell builtins.
-
-# for krb.
-#set -- `from -t`
-#v=$3
-set -- `from | wc -l`
-v=$1
-#v=`from | wc -l`
-
-#v=0
-#exec 0</var/mail/$USER
-#while read line; do
-# case "$line" in
-# "From "*) v=$(($v + 1)) ;;
-# esac
-#done
-#exec 0<&-
+v=$(grep -c "^From " /var/mail/$USER)
set --
g=0

View file

@ -1,7 +1,7 @@
# Template file for 'bsd-games'. Based on Arch PKGBUILD by Chris Brannon.
pkgname=bsd-games
version=2.17
revision=3
revision=4
patch_args="-Np1"
build_style=gnu-configure
make_dirs="
@ -12,7 +12,7 @@ hostmakedepends="flex words-en"
makedepends="ncurses-devel"
depends="words-en"
short_desc="A linux port for a collection of BSD command line games"
maintainer="Christian Neukirchen <chneukirchen@gmail.com>"
maintainer="Leah Neukirchen <leah@vuxu.org>"
license="BSD"
homepage="ftp://ftp.ibiblio.org/pub/Linux/games/"
distfiles="ftp://ftp.lip6.fr/pub/linux/sunsite/games/${pkgname}-${version}.tar.gz"