diff --git a/hudson-sflphone-script.sh b/hudson-sflphone-script.sh index 387c6efba75a517560f856b5f39667bcfe9dd59f..419466bb8624caeaaff2e11862e7f4c6fd7d394a 100755 --- a/hudson-sflphone-script.sh +++ b/hudson-sflphone-script.sh @@ -7,49 +7,59 @@ git clean -f -d -x XML_RESULTS="cppunitresults.xml" -set -x - -# Compile the plugins -pushd plugins -make distclean -./autogen.sh -./configure --prefix=/usr -make -j -popd - -# Compile the daemon -pushd daemon -make distclean -./autogen.sh -# Compile pjproject first -pushd libs/pjproject -./autogen.sh -./configure -make && make dep -popd -./configure --prefix=/usr -make clean -make -j -make doc -make check -popd - -# Run the unit tests for the daemon -# pushd daemon/test -# Remove the previous XML test file -# rm -rf $XML_RESULTS -# ./run_tests.sh || exit 1 -# popd - -# Compile the client -# pushd gnome -# make distclean -# ./autogen.sh -# ./configure --prefix=/usr -# make clean -# make -j 1 -# make check -# popd +if [ $# != 1 ]; then + echo "ERROR: Exactly one argument has to be passed. Must be in {daemon, gnome}" + exit 1 +fi + +if [ $1 == "daemon" ]; then + # Compile the daemon + pushd daemon + make distclean + ./autogen.sh + # Compile pjproject first + pushd libs/pjproject + ./autogen.sh + ./configure + make && make dep + popd + ./configure --prefix=/usr + make clean + make -j + make doc + make check + popd + + # Run the unit tests for the daemon + # pushd daemon/test + # Remove the previous XML test file + # rm -rf $XML_RESULTS + # ./run_tests.sh || exit 1 + # popd + +elif [ $1 == "gnome" ]; then + # Compile the plugins + pushd plugins + make distclean + ./autogen.sh + ./configure --prefix=/usr + make -j + popd + + # Compile the client + pushd gnome + make distclean + ./autogen.sh + ./configure --prefix=/usr + make clean + make -j 1 + make check + popd + +else + echo "ERROR: Bad argument. Must be in {daemon, gnome}" + exit 1 +fi # SUCCESS exit 0