X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=tools%2Fmake%2Fconfigure;h=32b2558ae0838051e4c1e1dca3c7e0fecaf4c6ca;hb=4cfb387892f85b158a240b4a81dab9795ac431a6;hp=cb61a7585cb21a41847c3c4c32e96bf36121d3da;hpb=4e9560e5d475437dbf5d8d0044d822b733f2d3e9;p=projects.git diff --git a/tools/make/configure b/tools/make/configure index cb61a75..32b2558 100755 --- a/tools/make/configure +++ b/tools/make/configure @@ -5,6 +5,8 @@ function echo_usage { echo "usage: configure [options]" echo " -b " echo " -a " + echo " -g " + echo " -n : do not delete src dir" } # to build a package you need ... @@ -20,13 +22,33 @@ fi paket=$1 build=$2 +shift 2 ARCH="" cpp_build=0 +alt_repos="" +delete_src=1 + +while getopts ":a:b:g:n" opt; do + case $opt in + a) ARCH=$OPTARG + ;; + b) branch=$OPTARG + ;; + g) alt_repos="-g $OPTARG" + ;; + n) delete_src=0 + ;; + \?) echo "Invalid option: -$OPTARG" + echo_usage + exit 1 + ;; + :) echo "Option -$OPTARG requires an argument." + echo_usage + exit 1 + ;; + esac +done -# checkout build utilities -if [ ! -d projects ]; then - git clone https://github.com/wagner-tech/projects/ -fi ln -sf projects/tools/make/makefile . # check standard files @@ -37,14 +59,9 @@ then fi # clean dirs and check out -if [ -d src ] +if [ -d src -a $delete_src -eq 1 ] then - echo "Shall I delete src dir? [y]/n" - read key - if [ "$key" != "n" ] - then - rm -rf src - fi + rm -rf src fi if [ -e $paket ] @@ -59,7 +76,7 @@ cwd=$(pwd) # checkout pushd src >/dev/null - ../$paket.co $build + ../$paket.co $alt_repos $build popd >/dev/null # load util functions for C/C++ - build @@ -114,4 +131,5 @@ fi # append version to make.pre echo "version = $version" >> make.pre +echo "build = $build" >> make.pre