jimb@dopey.AMD.COM (Jim Budler) (05/20/87)
Just a couple minor changes for the messages command, quiet the error from egrep if there is no mailfile exit mcount (mentioned earlier in this group) Also, make messages and checkalias depend on the Makefile. *** /tmp/,RCSt1020645 Wed May 20 08:23:55 1987 --- utils/Makefile Wed May 20 08:06:32 1987 *************** *** 64,70 ${CC} ${CFLAGS} ${DEFINE} autoreply.c ../src/opt_utils.o \ -o ../bin/autoreply ! ../bin/checkalias: @echo ': Use /bin/sh' > ../bin/checkalias @echo 'if [ "$$*" = "" ]; then' >> ../bin/checkalias @echo ' echo Usage: checkalias alias \[or aliases\]' >> \ --- 64,70 ----- ${CC} ${CFLAGS} ${DEFINE} autoreply.c ../src/opt_utils.o \ -o ../bin/autoreply ! ../bin/checkalias: Makefile @echo ': Use /bin/sh' > ../bin/checkalias @echo 'if [ "$$*" = "" ]; then' >> ../bin/checkalias @echo ' echo Usage: checkalias alias \[or aliases\]' >> \ *************** *** 75,81 @echo 'exec elm -c $$*' >> ../bin/checkalias @chmod +x ../bin/checkalias ! ../bin/messages: @echo ': Use /bin/sh' > ../bin/messages @echo 'if [ "$$2" != "" ]; then' >> ../bin/messages @echo ' echo Usage: messages \{folder-name\}' >> ../bin/messages --- 75,81 ----- @echo 'exec elm -c $$*' >> ../bin/checkalias @chmod +x ../bin/checkalias ! ../bin/messages: Makefile @echo ': Use /bin/sh' > ../bin/messages @echo 'if [ "$$2" != "" ]; then' >> ../bin/messages @echo ' echo Usage: messages \{folder-name\}' >> ../bin/messages *************** *** 90,96 @echo ' optional="in folder $$1"' >> ../bin/messages @echo 'fi' >> ../bin/messages @echo ' ' >> ../bin/messages ! @echo 'mcount=`egrep "^From " $$fname | wc -l`' >> ../bin/messages @echo ' ' >> ../bin/messages @echo 'if [ $$mcount = 1 ];then' >> ../bin/messages @echo ' echo There is $$mcount message $$optional' >> ../bin/messages --- 90,100 ----- @echo ' optional="in folder $$1"' >> ../bin/messages @echo 'fi' >> ../bin/messages @echo ' ' >> ../bin/messages ! @echo 'if [ -f $$fname ]; then' >> ../bin/messages ! @echo ' mcount=`egrep "^From " $$fname | wc -l`' >> ../bin/messages ! @echo 'else' >> ../bin/messages ! @echo ' exit 0' >> ../bin/messages ! @echo 'fi' >> ../bin/messages @echo ' ' >> ../bin/messages @echo 'if [ $$mcount = 1 ];then' >> ../bin/messages @echo ' echo There is $$mcount message $$optional' >> ../bin/messages *************** *** 98,104 @echo ' echo There are $$mcount messages $$optional' >> ../bin/messages @echo 'fi' >> ../bin/messages @echo ' ' >> ../bin/messages ! @echo 'exit 0' >> ../bin/messages @chmod +x ../bin/messages ../bin/trim-headers: --- 102,108 ----- @echo ' echo There are $$mcount messages $$optional' >> ../bin/messages @echo 'fi' >> ../bin/messages @echo ' ' >> ../bin/messages ! @echo 'exit $$mcount' >> ../bin/messages @chmod +x ../bin/messages ../bin/trim-headers: -- I hate mud. I like blue clean flowing water. LA sucks water. That doesn't mean I like LA. (Actually, I like a lot of things in LA) + Jim Budler Advanced Micro Devices, Inc. (408) 749-5806 + + Compuserve: 72415,1200; Delphi: JIMBUDLER; Usenet: jimb@amdcad.AMD.COM +