#!/bin/bash INSTALL_DIR=$EMoffice_HOME BUILD_DIR=build CC=gcc CXX=g++ runCommand () { if [ -n "$0" ] then echo -n "***** Executing command : " echo "$*" $* return $? else echo "****** Internal Error: no command passed to runCommand()" exit -1 fi } if [ -d $BUILD_DIR ]; then command="/bin/rm -rf $BUILD_DIR" runCommand $command fi command="mkdir $BUILD_DIR" runCommand $command command="cd $BUILD_DIR" runCommand $command command="env CC=$CC CXX=$CXX cmake -DCMAKE_INSTALL_PREFIX:PATH=$INSTALL_DIR ../../" runCommand $command command="make" runCommand $command command="make install" runCommand $command command="cd ../" runCommand $command