#! /bin/bash ARCH=`uname -m` GCC_VERSION_MAJOR=`echo __GNUC__ | gcc -E -xc - | tail -n 1` GCC_VERSION_MINOR=`echo __GNUC_MINOR__ | gcc -E -xc - | tail -n 1` DDS_DIR=$PWD/../NO-LGPL/RTIDDS/ if [ $ARCH == x86_64 ] then BIT_ARCH=x64 # HOST_TAR=rtidds45f-host-x64Linux.tar.gz.gpg # TARGET_TAR=rtidds45f-target-x64Linux2.6gcc4.1.2.tar.gz.gpg else if [ $ARCH == i386 -o $ARCH == i686 ] then BIT_ARCH=i86 else echo "ERROR: not supported platform: $ARCH" exit 2 fi fi if [ $GCC_VERSION_MAJOR == 4 ] then if [ $GCC_VERSION_MINOR -ge 4 ] then GCC_VER=4.4.5 else GCC_VER=4.1.2 fi else echo "ERROR: not supported gcc version: $GCC_VERSION_MAJOR" exit 3 fi HOST_TAR="RTI_Connext_DDS_Core_Host-5.1.0-"$BIT_ARCH"Linux.tar.gz.gpg" TARGET_TAR="RTI_Connext_DDS_Core_Target-5.1.0-"$BIT_ARCH"Linux2.6gcc"$GCC_VER".tar.gz.gpg" # do we have acrobat reader on the machine ? which acroread 2&>1 /dev/null ACRO_READER=$? # if option -c is specified we check out all necessary files if [ "$1" == "-c" ] then echo "Checking out RTIDDS (host tar $HOST_TAR for target $TARGET_TAR)" cd .. svn up NO-LGPL --depth files if [ $? != 0 ] then echo "ERROR: Could not svn co: ACS/ExtProd/NO-LGPL" exit 4 fi cd NO-LGPL svn up RTIDDS if [ $? != 0 ] then echo "ERROR: Could not svn co: ACS/ExtProd/NO-LGPL/RTIDDS" exit 4 fi DDS_DIR=$PWD/RTIDDS fi echo "Please read RTI Software License Agreement carefully!" if [ $ACRO_READER == 0 ] then acroread $DDS_DIR/RTISoftwareLicenseAgreement20101217.pdf else less -E $DDS_DIR/RTISoftwareLicenseAgreement20101217.txt fi echo "-------------------------------------------------------------------------------" echo "Press Y or y if you have read and you agree with RTI Software License Agreement" read -n1 AGREE if [ $AGREE != y -a $AGREE != Y ] then echo "" echo "installation of RTI DDS terminated !" exit 1 fi echo "" if [ -d $ALMASW_ROOTDIR/$ALMASW_RELEASE/RTI ] then echo $ALMASW_ROOTDIR/$ALMASW_RELEASE/RTI directory exists already. I clean it up. rm -rf $ALMASW_ROOTDIR/$ALMASW_RELEASE/RTI fi mkdir $ALMASW_ROOTDIR/$ALMASW_RELEASE/RTI if [ $? != 0 ] then echo "ERROR: Cold not create: " $ALMASW_ROOTDIR/$ALMASW_RELEASE/RTI exit 3 fi cd $ALMASW_ROOTDIR/$ALMASW_RELEASE/RTI echo "Please give the passphrase (will not bee seen on the screen) for $HOST_TAR & $TARGET_TAR: " read -sp ">" PASS gpg -d --batch --passphrase $PASS $DDS_DIR/$HOST_TAR | tar xvz if [ $? != 0 ] then cd $TMP_DIR echo "ERROR: failed to decrypte/unpack $HOST_TAR " exit 4 fi gpg -d --batch --passphrase $PASS $DDS_DIR/$TARGET_TAR | tar xvz if [ $? != 0 ] then cd $TMP_DIR echo "ERROR: failed to decrypte/unpack $TARGET_TAR " exit 5 fi cd $TMP_DIR echo "Installation of RTI DDS completed." echo "=================================="