2005-01-31 08:54:34 -06:00
|
|
|
|
#! /bin/sh
|
|
|
|
|
|
2005-11-09 02:28:58 -06:00
|
|
|
|
CURRENTDIR=`/bin/pwd`
|
2006-07-13 06:02:41 -05:00
|
|
|
|
SDKTMPDIR=`dirname $0`
|
|
|
|
|
SDKDIRECTORY=`(cd $SDKTMPDIR && pwd && cd $CURRENTDIR) | head -n 1`
|
2005-11-09 02:28:58 -06:00
|
|
|
|
OO_SDK_NAME=`basename $SDKDIRECTORY`
|
|
|
|
|
|
|
|
|
|
if [ "$1" = "--force-configure" ]
|
|
|
|
|
then
|
|
|
|
|
if [ -r $HOME/$OO_SDK_NAME/setsdkenv_unix.sh ]
|
|
|
|
|
then
|
|
|
|
|
rm $HOME/$OO_SDK_NAME/setsdkenv_unix.sh
|
|
|
|
|
fi
|
|
|
|
|
if [ -r $HOME/$OO_SDK_NAME/setsdkenv_unix.csh ]
|
|
|
|
|
then
|
|
|
|
|
rm $HOME/$OO_SDK_NAME/setsdkenv_unix.csh
|
2005-12-28 11:05:23 -06:00
|
|
|
|
fi
|
|
|
|
|
shift
|
2005-11-09 02:28:58 -06:00
|
|
|
|
elif [ "$1" = "-h" ] || [ "$1" = "--help" ] || [ -n "$1" ]
|
|
|
|
|
then
|
|
|
|
|
echo
|
|
|
|
|
echo " using: setsdkenv_unix [options]"
|
|
|
|
|
echo ""
|
|
|
|
|
echo " options:"
|
|
|
|
|
echo " --force-configure : force a new configuration of your SDK environment."
|
|
|
|
|
echo " Alternatively can you edit your SDK environment scripts directly:"
|
|
|
|
|
echo " $HOME/$OO_SDK_NAME/setsdkenv_unix.sh"
|
|
|
|
|
echo " $HOME/$OO_SDK_NAME/setsdkenv_unix.csh"
|
|
|
|
|
echo " -h, --help : print this help and exit"
|
|
|
|
|
echo
|
|
|
|
|
exit 1
|
|
|
|
|
fi
|
2005-01-31 08:54:34 -06:00
|
|
|
|
|
|
|
|
|
# source the prepared environment and start a new shell
|
2005-11-09 02:28:58 -06:00
|
|
|
|
if [ -r $HOME/$OO_SDK_NAME/setsdkenv_unix.sh ]
|
2005-01-31 08:54:34 -06:00
|
|
|
|
then
|
2005-11-09 02:28:58 -06:00
|
|
|
|
. $HOME/$OO_SDK_NAME/setsdkenv_unix.sh
|
2005-01-31 08:54:34 -06:00
|
|
|
|
else
|
|
|
|
|
echo
|
2005-11-09 02:28:58 -06:00
|
|
|
|
echo " ************************************************************************"
|
2005-01-31 08:54:34 -06:00
|
|
|
|
echo " *"
|
2005-11-09 02:28:58 -06:00
|
|
|
|
echo " * You have to configure your SDK environment first before you can"
|
|
|
|
|
echo " * can use it! The configuration has to be done only once."
|
2005-01-31 08:54:34 -06:00
|
|
|
|
echo " *"
|
2005-11-09 02:28:58 -06:00
|
|
|
|
echo " ************************************************************************"
|
2005-01-31 08:54:34 -06:00
|
|
|
|
echo
|
2005-11-09 02:28:58 -06:00
|
|
|
|
perl $SDKDIRECTORY/configure.pl $SDKDIRECTORY
|
|
|
|
|
|
|
|
|
|
. $HOME/$OO_SDK_NAME/setsdkenv_unix.sh
|
2005-01-31 08:54:34 -06:00
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
"$SHELL" "$@"
|
|
|
|
|
echo Shell terminated.
|
|
|
|
|
|
|
|
|
|
TERMHEAD=`hostname`
|
|
|
|
|
echo "]2;$TERMHEAD"
|