Skip to content
Snippets Groups Projects
install 827 B
Newer Older
#!/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";
    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 ..

if test ${BUILD_RELEASE} = "yes";
    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 ..