#!/bin/bash BUILD_DEBUG="yes" BUILD_RELEASE="yes" OPTIONS="" for option in "$@" do case $option in --no-debug ) BUILD_DEBUG="no" ;; --no-release ) BUILD_RELEASE="no" ;; * ) OPTIONS="${OPTIONS} ${option}" ;; esac done if test ${BUILD_DEBUG} = "yes"; then if [ ! -d Debug ]; then mkdir Debug fi cd Debug ../build --root-dir=.. --build=Debug ${OPTIONS} if test $? != 0; then exit 1 fi make install cd .. fi if test ${BUILD_RELEASE} = "yes"; then if [ ! -d Release ]; then mkdir Release fi cd Release ../build --root-dir=.. --build=Release ${OPTIONS} if test $? != 0; then exit 1 fi make install cd .. fi exit 0