Commit 53682f14 authored by Arnaud Blanchard's avatar Arnaud Blanchard

Use the content of .gitmodules to select 'all' projects. Hide log data if there is no errors

parent 22890be0
......@@ -14,7 +14,8 @@ echo
echo "Check all projects"
echo "================="
echo
echo "It should take ~10s or less"
error=0
git submodule foreach --quiet '( ./check.sh || echo "\nmodule: $path\n### ERROR: $? ###" )' #( ) for execution in parallel
mkdir -p /tmp/blaar
#We make sure we respect the order of compilation in .gitmodules
cat .gitmodules | sed -n 's/.*path = //p' | { while read project; do echo "Check **$project**"; $project/check.sh $build_type > /tmp/blaar/check_$project.log || { echo;echo "### Fail checking: '$project' ###"; cat /tmp/blaar_check_$project.log; echo; exit 1; } done }
echo
......@@ -23,7 +23,7 @@ case "$1" in
(-h) usage; exit 0;;
(-q) QUIET=-q;;
(--) shift; break;;
(-*) echo "$0: error - unrecognized option $1" 1>&2; exit 1;;
(-*) echo "$0: error - unrecognized option $1"; exit 1;;
(*) break;;
esac
shift
......@@ -41,12 +41,12 @@ cd `dirname $0`
blaar_dir="$PWD"
blaar_build_dir="${blaar_dir}_build"
echo "Compiling **$project_name**" >&2
echo "Compiling **$project_name**"
if [ $2 ]; then
case $2 in
Release|Debug|RelWithDebugInfo|MinSizeRel) build_type="$2";;
*)echo "Unknown build type '$2'">&2; usage;;
*)echo "Unknown build type '$2'"; usage;;
esac
else build_type="Release"
fi
......
......@@ -55,8 +55,14 @@ blaar_build_dir="${blaar_dir}_build"
[ "$1" = "all" ] &&
{
echo
echo "Install all current projects"
echo "============================"
echo
#We make sure we respect the order of compilation in .gitmodules
cat .gitmodules | sed -n 's/.*path = //p' | { while read project; do ./install.sh $project $build_type || { echo;echo "Fail compiling $project";echo; exit 1; } done }
mkdir -p /tmp/blaar
cat .gitmodules | sed -n 's/.*path = //p' | { while read project; do echo "Install **$project**"; ./install.sh $project $build_type > /tmp/blaar/install_$project.log || { echo;echo "Fail installing $project";cat /tmp/blaar_install_{$project}.log; echo; exit 1; } done }
echo
exit 0
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment