projects
/
projects.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
7f51ac6
)
posaune
author
Michael Wagner
<info@wagnertech.de>
Fri, 8 Jul 2016 07:19:57 +0000
(09:19 +0200)
committer
Michael Wagner
<info@wagnertech.de>
Fri, 8 Jul 2016 07:19:57 +0000
(09:19 +0200)
tools/make/configure
patch
|
blob
|
history
diff --git
a/tools/make/configure
b/tools/make/configure
index
e27e9e2
..
32b2558
100755
(executable)
--- a/
tools/make/configure
+++ b/
tools/make/configure
@@
-5,6
+5,8
@@
function echo_usage {
echo "usage: configure <package> <revision> [options]"
echo " -b <branch-rev>"
echo " -a <arch>"
echo "usage: configure <package> <revision> [options]"
echo " -b <branch-rev>"
echo " -a <arch>"
+ echo " -g <alternative repository>"
+ echo " -n : do not delete src dir"
}
# to build a package you need ...
}
# to build a package you need ...
@@
-20,26
+22,33
@@
fi
paket=$1
build=$2
paket=$1
build=$2
+shift 2
ARCH=""
cpp_build=0
ARCH=""
cpp_build=0
+alt_repos=""
+delete_src=1
-shift 2
-while getopts "b:a:" opt
-do
+while getopts ":a:b:g:n" opt; do
case $opt in
case $opt in
- a) ARCH=$OPTARG
- ;;
- b) echo "branching not implemented"
- ;;
- *) exit 1
- ;;
+ 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
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
ln -sf projects/tools/make/makefile .
# check standard files
@@
-50,14
+59,9
@@
then
fi
# clean dirs and check out
fi
# clean dirs and check out
-if [ -d src ]
+if [ -d src
-a $delete_src -eq 1
]
then
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 ]
fi
if [ -e $paket ]
@@
-72,7
+76,7
@@
cwd=$(pwd)
# checkout
pushd src >/dev/null
# checkout
pushd src >/dev/null
- ../$paket.co $
build
+ ../$paket.co $
alt_repos $build
popd >/dev/null
# load util functions for C/C++ - build
popd >/dev/null
# load util functions for C/C++ - build