#!/bin/ksh
#
# mydate
#
#     Run mojoe, setting MOJOE_DATE to the input argument
#
# When the MOJOE_DATE environment variable is not set, as is the usual
# case, then the subject directory is tagged with today's date in the
# form of mm_dd_yy.
#
# example:
#    mydate 03_03_03
#
#
if (test $# -eq 1) then
    MOJOE_DATE=$1
    export MOJOE_DATE
fi
today=`date '+%m_%d_%y'`
label=$MOJOE_DATE
if (test ${#label} -lt 1) then
    label=$today
fi
echo ... running mojoe with date tag = $label
mojoe
echo ... mojoe date has been reset = $today
