autobuild.sh 1.95 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62
#!/bin/bash

PS3='Please enter your choice: '
LIST="in_source_build install_build grab_debian_dependencies package_source package remake clean END"
MAKEARGS="-j8"
echo 
echo in_source_build: is used for development and you can start the scicoslab toolbox by typing scicoslab in the oooark source directory
echo install_build: is used for building before final installation to the system.
echo grab_debian_dependencies: installs all the required packages for debian based systems \(ubuntu maverick/ debian squeeze,lenny\)
echo remake: calls make again after project has been configured as install or in source build
echo package_source: creates a source package for distribution
echo package: creates binary packages for distribution
echo clean: removes the build directory 

echo
select OPT in $LIST
do
	if [ $OPT = "in_source_build" ] &> /dev/null
	then
		echo you chose in source build
		mkdir -p build && cd build && cmake -DIN_SRC_BUILD:bool=TRUE .. && make $MAKEARGS
		exit 0
	elif [ $OPT = "install_build" ] &> /dev/null
	then
		echo you chose install build
		mkdir -p build && cd build && cmake .. && make $MAKEARGS
		exit 0
	elif [ $OPT = "grab_debian_dependencies" ] &> /dev/null
	then
		echo you chose to install debian dependencies
		sudo apt-get install cmake libqt4-dev libboost-all-dev libopenscenegraph-dev
		sudo apt-get install scicoslab-gtk
		exit 0

	elif [ $OPT = "remake" ] &> /dev/null
	then
		echo you chose to recall make on the previously configured build
		cd build && make $MAKEARGS
		exit 0

	elif [ $OPT = "package_source" ] &> /dev/null
	then
		echo you chose to package the source
		mkdir -p build && cd build && cmake .. && make package_source
		exit 0

	elif [ $OPT = "package" ] &> /dev/null
	then
		echo you chose to package the binary
		mkdir -p build && cd build && cmake .. && make package
		exit 0

	elif [ $OPT = "clean" ] &> /dev/null
	then
		echo you chose to clean the build 
		rm -rf build

	elif [ $OPT = "END" ] &> /dev/null
	then
		exit 0
	fi
done