#!/bin/sh
# Copyright (c) 1993 by Sanjay Ghemawat

############################################################################
# Configuration Section
#
#	bindir		Location where calendar shell is installed
#	libdir		Location where tcl files are installed

bindir="/usr/contrib/bin"
libdir="/usr/contrib/lib/ical"

ICAL_LIBRARY="$libdir"
export ICAL_LIBRARY

args="$*"

############################################################################
# Check if we can get by without opening X display

nowindow="";
while test "$#" != 0; do
    if test "$1" = "-list"; then
	nowindow=yes;
	break
	fi
    if test "$1" = "-show"; then
	nowindow=yes
	break
    fi
    shift
    done

if test -z "$nowindow"; then
    exec $bindir/calshellx -name ical -f $libdir/ical_x.tcl $args
  else
    exec $bindir/calshell $libdir/ical_text.tcl $args
  fi
