#!/bin/bash # run as: ./makegs2.sh # or ./makegs2.sh gnome-lib to compile GS2 using gnome-lib # which checks out gnome-lib src from svn if needed and if possible docheckout=$1 gsdlhome=`pwd` echo "**** GSDLHOME: $gsdlhome" # Compile by chaining the commands with && so it stops at that stage after an error cd $gsdlhome if [ "x$docheckout" = "xgnome-lib" ]; then ./configure --enable-gnome-lib-ext --enable-apache-httpd \ && make \ && make install else ./configure --enable-apache-httpd \ && make \ && make install fi status=$? echo "****************************************" if [ $status = 0 ] ; then # 5. Message to warn user that the env of this x-term uses gnome-lib # and GUIs may not work from this console if [ "x$docheckout" = "xgnome-lib" ]; then echo "*** The environment for this console has been set to compile Greenstone with gnome-lib." echo "*** As a result, graphical applications may not work well." echo "*** In such a case, open a new console." else echo "Finished compiling Greenstone2. (Compiled without gnome-lib)" fi else echo "@@@ Error compiling up Greenstone. Return status: $status" fi echo "****************************************"