#!/usr/bin/env bash

#############################################################################
# @ddblock_begin copyright 
#
# Copyright (c) 1999-2012
# Maryland DSPCAD Research Group, The University of Maryland at College Park 
#
# Permission is hereby granted, without written agreement and without
# license or royalty fees, to use, copy, modify, and distribute this
# software and its documentation for any purpose, provided that the above
# copyright notice and the following two paragraphs appear in all copies
# of this software.
# 
# IN NO EVENT SHALL THE UNIVERSITY OF MARYLAND BE LIABLE TO ANY PARTY
# FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
# ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF
# THE UNIVERSITY OF MARYLAND HAS BEEN ADVISED OF THE POSSIBILITY OF
# SUCH DAMAGE.
# 
# THE UNIVERSITY OF MARYLAND SPECIFICALLY DISCLAIMS ANY WARRANTIES,
# INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE
# PROVIDED HEREUNDER IS ON AN "AS IS" BASIS, AND THE UNIVERSITY OF
# MARYLAND HAS NO OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, UPDATES,
# ENHANCEMENTS, OR MODIFICATIONS.
#
# @ddblock_end copyright 
#############################################################################

# Startup file for LIDE. This is a standard startup file. It should typically
# be used "as is," without modifications.
# 
# Version: 11/20/2011

# Export definitions to subprocesses 
set -a

# A simple function that displays the message given by the script arguments
# (all arguments make up the message)
# if the value of the LIDEVERBOSE environment variable is a non-empty string.
function lide_diagnostic { 
    if [ -n "$LIDEVERBOSE" ]; then
        echo $@
    fi
}

# The location of the dice user directory.
LIDEUSER=`pwd`

# Load UX customizations that are needed upon startup.
if ! [ -f startup/uxdefs_lide ]; then
    echo lide startup error: cannot find uxdefs_lide file
    return 1
fi
nextscript=`pwd`/startup/uxdefs_lide
lide_diagnostic starting $nextscript 
source $nextscript
lide_diagnostic finished with $nextscript

# Load the standard LIDE configuration.
nextscript=$UXLIDE/config/startup/standard_startup
lide_diagnostic starting $nextscript 
source $nextscript
lide_diagnostic finished with $nextscript

