--- a/sbsv2/raptor/bin/sbs Tue Nov 02 16:54:53 2010 +0800
+++ b/sbsv2/raptor/bin/sbs Fri Nov 12 14:49:36 2010 +0000
@@ -21,96 +21,11 @@
if [ -z "$SBS_HOME" ] ; then
temp=$0
SBS_HOME=$(cd ${temp%/*} && echo $PWD)
- export SBS_HOME=${SBS_HOME%/bin}
-fi
-
-# Ensure that the host type is set for Raptor:
-eval $($SBS_HOME/bin/gethost.sh -e)
-
-if [ -z "$HOSTPLATFORM" ]; then
- echo "Error: HOSTPLATFORM could not be determined." 1>&2
- exit 1
-fi
-
-if [ ! -d "$SBS_HOME/$HOSTPLATFORM_DIR" ]; then
-cat 1>&2 <<EOERROR
-Error: sbs has not been installed with support for your platform: "${HOSTPLATFORM}".
-
-The utilites for your platform should be in "$SBS_HOME/$HOSTPLATFORM_DIR" but sbs
-cannot find them there.
-
-sbs is supported on:
- win32
- linux i386 libc2_3 (Redhat 4)
-
-sbs has been known to work (but is not supported) on:
- linux x86_64 libc2_5 (e.g. Centos/Redhat 5.3 64-bit)
- linux i386 libc2_8 (e.g. Fedora 9 32-bit)
- linux x86_64 libc2_10 (e.g. Fedora 11 64-bit)
-
-Even with the appropriate utilities it may be necessary to install 32-bit
-compatibility versions of some libraries (e.g. glibc) on these platforms,
-particularly for 3rd party tools which are not built natively such as
-compilers.
-
-It may be possible to build and install the utilities for your platform by
-entering $SBS_HOME/util and running
- make -k
-A full development environment is required however.
-EOERROR
- exit 1
+ export SBS_HOME
fi
-if [ "$OSTYPE" == "cygwin" ]; then
- __MINGW__=${SBS_MINGW:-$SBS_HOME/$HOSTPLATFORM_DIR/mingw}
- __CYGWIN__=${SBS_CYGWIN:-$SBS_HOME/$HOSTPLATFORM_DIR/cygwin}
-
- # Command for unifying path strings. For example, "c:\some\path" and
- # "/cygdrive/c/some/path" will both be converted into "c:/some/path".
- u="$__CYGWIN__/bin/cygpath.exe -m"
-
- SBS_HOME=${SBS_HOME//\\//}
- export SBS_HOME=$($u "$SBS_HOME")
-
- __MINGW__=$($u "$__MINGW__")
- __CYGWIN__=$($u "$__MINGW__")
- export PATH=${__MINGW__}/bin:${__CYGWIN__}/bin:$SBS_HOME/$HOSTPLATFORM_DIR/bin:$PATH
-
- # Tell Cygwin not to map unix security attributes to windows to
- # prevent raptor from potentially creating read-only files:
- export CYGWIN='nontsec nosmbntsec'
-
- # The python and PYTHONPATH used by Raptor are determined by, in order of precedence:
- # 1. the SBS_PYTHON and SBS_PYTHONPATH environment variables (if set)
- # 2. the python shipped locally with Raptor (if present)
- # 3. the python on the system PATH and the PYTHONPATH set in the system environment
-
- __LOCAL_PYTHON__=$SBS_HOME/win32/python264/python.exe
-
- if [ -n "$SBS_PYTHON" ]; then
- __PYTHON__=$SBS_PYTHON
- elif [ -f "$__LOCAL_PYTHON__" ]; then
- __PYTHON__=$__LOCAL_PYTHON__
- export SBS_PYTHON=$__PYTHON__
- export PYTHONPATH=
- else
- __PYTHON__=python.exe
- fi
- __PYTHON__=$($u "$__PYTHON__")
-
- if [ -n "$SBS_PYTHONPATH" ]; then
- export PYTHONPATH=$($u "$SBS_PYTHONPATH")
- fi
-else
- PYDIR=python27 # not exported on purpose
- export PYTHONPATH=${SBS_PYTHONPATH:-$SBS_HOME/$HOSTPLATFORM_DIR/$PYDIR/lib}
- PATH=$SBS_HOME/$HOSTPLATFORM_DIR/$PYDIR/bin:$SBS_HOME/$HOSTPLATFORM_DIR/bin:$PATH
- LD_LIBRARY_PATH=$SBS_HOME/$HOSTPLATFORM_DIR/$PYDIR/lib:$SBS_HOME/$HOSTPLATFORM_DIR/bv/lib:$LD_LIBRARY_PATH
-
- export PATH LD_LIBRARY_PATH
- __PYTHON__=python
-fi
-
+# Call sbs_env script
+source $SBS_HOME/bin/sbs_env
# call raptor_start.py with the arguments