#!/bin/sh # # Original From: patwood at unirot /dot/ UUCP (Patrick Wood) # # The following is a PostScript program to print calendars. It doesn't # work on or before 1752. # # Shell stuff added 3/9/87 by King Ables # # Made pretty by tjt 1988 # # Brian Ward (http://www.o--o.net/) # 1991 Got rid of stupid printer stuff # 2003 Fixed stupid 2000/2001 day offset bug # 2003 Converted to sh # 2003 Default month/year # 2003 Added some dumb options # 2004 Maybe actually fixed the day offset bug for real # # CONFIGURE: custom fonts -- if you define these and use the -f flag, # mocal will use these fonts instead of the defaults TITLEFONT=LucidaSans TITLEFONTFILE=/home/bri/Mail/spam/lsr.pfa DAYFONT=LucidaSans # DAYFONT=LucidaSans-Bold # DAYFONTFILE=/home/bri/Mail/spam/lsb.pfa # end of configuration USE_MYFONTS=0 while [ $# -gt 0 ]; do NOT_OK=1 case $1 in -f) USE_MYFONTS=1 ;; *) if [ -z "$MONTH" ]; then MONTH=$1 NOT_OK=0 else if [ -z "$YEAR" ]; then YEAR=$1 NOT_OK=0 fi fi if [ $NOT_OK -eq 1 ]; then echo "usage: $0 [-f] [month [year]]" >&2 exit 1 fi ;; esac shift done if [ -z $YEAR ]; then YEAR=`date +%Y` fi if [ -z $MONTH ]; then MONTH=`date +%m` fi if [ $USE_MYFONTS -eq 0 ]; then TITLEFONT=Times-Bold DAYFONT=Helvetica-Bold # if your printer doesn't have these fonts, fill in the following TITLEFONTFILE= DAYFONTFILE= fi cat <