Commit f87ec317 authored by Arnaud Blanchard's avatar Arnaud Blanchard
Browse files

Big updates about file organisation and bash scripts

parents 19d5031d b679cb78
Useful command for git
======================
Merge
=====
`git merge <the branch you merge from>`
Note that git pull merge from he repository branch
Conflicts:
----------
You can use **meld** to have a graphical interface to select the differences.
You want to get only their modifications: `git checkout --theirs <files>`
You want to get only yours modifications: ` git checkout --ours <files>`
Then `git add <files>`to say you fix the conflict.
Remove a specific commits: `git revert <commit id>`
#!/bin/sh
#BLARR - Basic Librairies And Applications for Robotics
#Copyright ETIS — ENSEA, Université de Cergy-Pontoise, CNRS (2015 - 2016
#Basic Librairies And Applications for Robotics (BLAAR)
#Copyright ETIS — ENSEA, Université de Cergy-Pontoise, CNRS (2015 - 2017)
#This software is governed by the CeCILL v2.1 license under French law and abiding by the rules of distribution of free software.
#You can use, modify and/ or redistribute the software under the terms of the CeCILL v2.1 license as circulated by CEA, CNRS and INRIA at the following URL "http://www.cecill.info".
#As a counterpart to the access to the source code and rights to copy, modify and redistribute granted by the license, users are provided only with a limited warranty and the software's author, the holder of the economic rights, and the successive licensors have only limited liability.
#In this respect, the user's attention is drawn to the risks associated with loading, using, modifying and/or developing or reproducing the software by the user in light of its specific status of free software, that may mean that it is complicated to manipulate, and that also therefore means that it is reserved for developers and experienced professionals having in-depth computer knowledge.
#Users are therefore encouraged to load and test the software's suitability as regards their requirements in conditions enabling the security of their systems and/or data to be ensured and, more generally, to use and operate it in the same conditions as regards security.
#The fact that you are presently reading this means that you have had knowledge of the CeCILL v2.1 license and that you accept its terms.
#
#Author: Arnaud Blanchard
#Date: April 2015
usage()
{
echo "usage: compile.sh [-h] [-q] <project dir> [Release|Debug|RelWithDebugInfo|MinSizeRel] [<target>]" >&2
#!/usr/bin/env bash #Use your $PATH to find bash
set -o errexit #Exit on first error
set -o nounset #Error if a variable is used but not defined
set -o pipefail #Error if a pipe fail
usage(){
echo "usage: compile.sh [-h] <project dir> [Release|Debug|RelWithDebugInfo|MinSizeRel] [<target>]"
}
set -- $(getopt hq "$@")
args=$(getopt h $*) || { usage; exit 1; }
set -- $args #update positional parameter
while [ $# -gt 0 ]
do
case "$1" in
(-h) usage; exit 0;;
(-q) QUIET=-q;;
(--) shift; break;;
(-*) echo "$0: error - unrecognized option $1"; exit 1;;
(*) break;;
......@@ -29,49 +29,45 @@ esac
shift
done
[ $1 ] || { echo "Missing project directory."; usage; exit 1; }
[ $# -lt 1 ] && { echo "Missing project directory."; usage; exit 1; }
#We go to the project directory and get the directory name then we go back to seach for the baar directory
cd $1
project_dir="$PWD";
project_name=`basename $project_dir`;
cd - > /dev/null;
project_dir="$PWD"
project_name=$(basename $project_dir)
cd - >/dev/null #Now we have the project directory we go back in current directory without message (/dev/null)
cd `dirname $0`
cd $(dirname $0) #We go in the directory of the current program which is in blaar
blaar_dir="$PWD"
blaar_build_dir="${blaar_dir}_build"
echo "Compiling **$project_name**"
echo "Compiling **$project_dir**"
if [ $2 ]; then
if [ $# -gt 1 ]; then
case $2 in
Release|Debug|RelWithDebugInfo|MinSizeRel) build_type="$2";;
*)echo "Unknown build type '$2'"; usage;;
Release|Debug|RelWithDebugInfo|MinSizeRel) build_type="$2";;
*)echo "Unknown build type '$2'"; usage;;
esac
else build_type="Release"
fi
if [ ! $3 ]; then
target="$project_name"
if [ $# -gt 3 ]; then
target=$(basename $3)
else
target=`basename $3`
target="$project_name"
fi
build_dir="$blaar_build_dir/${build_type}/$project_name"
build_dir="$blaar_build_dir/cmake_files_${build_type}/$project_name"
mkdir -p "$build_dir"
mkdir -p "$blaar_build_dir/Release/bin"
mkdir -p "$blaar_build_dir/Release"
[ -d build ] || ln -s "$blaar_build_dir" build
[ -d bin ] || ln -s "$blaar_build_dir/Release/bin" bin
[ -d bin ] || ln -s "$blaar_build_dir/Release" bin
cd $build_dir
#On mac and linux -nt does not return the same if the file does not exist
[ ! -e build.ninja -o $project_dir/CMakeLists.txt -nt build.ninja ] && cmake -GNinja $QUIET $project_dir -DCMAKE_BUILD_TYPE=$build_type -DLIBRARY_OUTPUT_PATH="${blaar_build_dir}/${build_type}/lib" -DEXECUTABLE_OUTPUT_PATH="${blaar_build_dir}/${build_type}/bin"
ninja $target
result=$?
exit $result
#On mac and linux -nt does not return the same if the file does not exist. We have to check the no existance or seniority
[ ! -e build.ninja -o $project_dir/CMakeLists.txt -nt build.ninja ] && {
cmake --no-warn-unused-cli -GNinja $project_dir -DCMAKE_BUILD_TYPE=$build_type -DLIBRARY_OUTPUT_PATH="${blaar_build_dir}/${build_type}" -DEXECUTABLE_OUTPUT_PATH="${blaar_build_dir}/${build_type}"
}
ninja
#!/bin/sh
#BLARR - Basic Librairies And Applications for Robotics
#Copyright ETIS — ENSEA, Université de Cergy-Pontoise, CNRS (2015 - 2016
#This software is governed by the CeCILL v2.1 license under French law and abiding by the rules of distribution of free software.
#You can use, modify and/ or redistribute the software under the terms of the CeCILL v2.1 license as circulated by CEA, CNRS and INRIA at the following URL "http://www.cecill.info".
#As a counterpart to the access to the source code and rights to copy, modify and redistribute granted by the license, users are provided only with a limited warranty and the software's author, the holder of the economic rights, and the successive licensors have only limited liability.
#In this respect, the user's attention is drawn to the risks associated with loading, using, modifying and/or developing or reproducing the software by the user in light of its specific status of free software, that may mean that it is complicated to manipulate, and that also therefore means that it is reserved for developers and experienced professionals having in-depth computer knowledge.
#Users are therefore encouraged to load and test the software's suitability as regards their requirements in conditions enabling the security of their systems and/or data to be ensured and, more generally, to use and operate it in the same conditions as regards security.
#The fact that you are presently reading this means that you have had knowledge of the CeCILL v2.1 license and that you accept its terms. *
# Basic Libraries And Applications for Robotics (BLAAR)
# Copyright ETIS — ENSEA, University of Cergy-Pontoise, CNRS (2011 - 2017)
# Author: Arnaud Blanchard
#
#Author: Arnaud Blanchard
#Date: April 2015
# This software is governed by the CeCILL v2.1 license under French law and abiding by the rules of distribution of free software.
# You can use, modify and/ or redistribute the software under the terms of the CeCILL v2.1 license as circulated by CEA, CNRS and INRIA at the following URL "http://www.cecill.info".
# As a counterpart to the access to the source code and rights to copy, modify and redistribute granted by the license,
# users are provided only with a limited warranty and the software's author, the holder of the economic rights, and the successive licensors have only limited liability.
# In this respect, the user's attention is drawn to the risks associated with loading, using, modifying and/or developing or reproducing the software by the user in light of its specific status of free software,
# that may mean that it is complicated to manipulate, and that also therefore means that it is reserved for developers and experienced professionals having in-depth computer knowledge.
# Users are therefore encouraged to load and test the software's suitability as regards their requirements in conditions enabling the security of their systems and/or data to be ensured  and, more generally, to use and operate it in the same conditions as regards security.
# The fact that you are presently reading this means that you have had knowledge of the CeCILL v2.1 license and that you accept its terms.
#!/usr/bin/env bash #Use your $PATH to find bash
set -o errexit #Exit on first error
set -o nounset #Error if a variable is used but nont defined
set -o pipefail #Error if a pipe fail
usage(){
echo "usage: debug.sh <project dir> [args ...]" >&2
echo "usage: debug.sh <project dir> [args ...]"
}
[ $# -lt 1 ] && { echo "Missing project directory."; usage; exit 1; }
[ $1 ] || { echo "Missing project directory."; usage; exit 1; }
cd $1;
project_dir="$PWD";
project_name=`basename $project_dir`;
cd - >/dev/null
#We get the project directory
cd $1
project_dir="$PWD"
project_name=$(basename $project_dir)
cd - > /dev/null
cd `dirname $0`
#We go in blaar directory
cd $(dirname $0)
blaar_dir="$PWD"
blaar_build_dir="${blaar_dir}_build"
./compile.sh "$project_dir" "Debug" "$project_name" >&2
[ $? ] || { echo "Fail compiling '$project_dir'" >&2; exit 2; }
mkdir -p /tmp/blaar
bin_dir="$blaar_build_dir/Debug/bin"
./compile.sh "$project_dir" "Debug" "$project_name" > /tmp/blaar/compile_${project_name}.log || { echo "Fail compiling '$project_dir'"; cat /tmp/blaar/compile_$project_name.log; exit 2; }
bin_dir="$blaar_build_dir/Debug"
shift #remove $0 i.e. debug.sh from $@
command_line="$bin_dir/$project_name $@"
shift #remove $1
echo >&2
echo "Debug $project_name" >&2
echo "==============" >&2
echo
echo "'run' to start" >&2
echo
command -v lldb && { set -x; lldb -- "$bin_dir/$project_name" "$@"; }||{ set -x; gdb --args "$bin_dir/$project_name" "$@"; }
command -v lldb >/dev/null && {
echo "use 'process launch -i <your pipe>' if you want debug with a named pipe"
lldb -- $command_line
}||{
echo "use 'run < <your named pipe>' if you want debug with a named pipe"
gdb --args $command_line
}
......
Developper tools
================
Tools usually not directly called by the user.
Tools not directly called by the user.
Install
=======
......
# Basic Libraries And Applications for Robotics (BLAAR)
# Copyright ETIS — ENSEA, University of Cergy-Pontoise, CNRS (2011 - 2017)
# Author: Arnaud Blanchard
#
# This software is governed by the CeCILL v2.1 license under French law and abiding by the rules of distribution of free software.
# You can use, modify and/ or redistribute the software under the terms of the CeCILL v2.1 license as circulated by CEA, CNRS and INRIA at the following URL "http://www.cecill.info".
# As a counterpart to the access to the source code and rights to copy, modify and redistribute granted by the license,
# users are provided only with a limited warranty and the software's author, the holder of the economic rights, and the successive licensors have only limited liability.
# In this respect, the user's attention is drawn to the risks associated with loading, using, modifying and/or developing or reproducing the software by the user in light of its specific status of free software,
# that may mean that it is complicated to manipulate, and that also therefore means that it is reserved for developers and experienced professionals having in-depth computer knowledge.
# Users are therefore encouraged to load and test the software's suitability as regards their requirements in conditions enabling the security of their systems and/or data to be ensured  and, more generally, to use and operate it in the same conditions as regards security.
# The fact that you are presently reading this means that you have had knowledge of the CeCILL v2.1 license and that you accept its terms.
#!/usr/bin/env bash #Use your $PATH to find bash
set -o errexit #Exit on first error
set -o nounset #Error if a variable is used but nont defined
set -o pipefail #Error if a pipe fail
#Bracket to be sure the file is fully loaded before excuting
{
echo
echo "Standard blaar install"
echo "======================"
echo
echo "Check that there is no conflicting directories"
echo "----------------------------------------------"
echo
[ -d blaar ] && { echo "blaar directory already exist. Remove it or change the current install directory."; exit 1; }
[ -d blaar_build ] && { echo "blaar_build directory already exist. Remove it or change the current install directory."; exit 1; }
echo
echo "Install the paclkage manager homebrew (http://brew.sh)" #This is similar to apt-get on Linux
echo "------------------------------------------------------"
echo
type brew || /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" || { echo "### Fail downloading homebrew"; exit 1;} #Install homebrew
echo
echo "Install required packages"
echo "-------------------------"
echo
echo "### Minimum packages:"
echo
brew install git cmake ninja #minimal requirement
echo
echo "### Standards packages: "
echo
brew install doxygen libpng libjpeg #gtk+3 gnome-icon-theme classical requirement
echo
echo "Download sources"
echo "----------------"
echo
git clone https://framagit.org/blaar/blaar
echo
cd blaar
echo
developer_tools/clone_osx_projects.sh
echo
echo "Install and test each project"
echo "-----------------------------"
echo
./install.sh all
./check_all.sh
echo
echo "**Success installing standard blaar**"
echo
}
# Basic Libraries And Applications for Robotics (BLAAR)
# Copyright ETIS — ENSEA, University of Cergy-Pontoise, CNRS (2011 - 2017)
# Author: Arnaud Blanchard
#
# This software is governed by the CeCILL v2.1 license under French law and abiding by the rules of distribution of free software.
# You can use, modify and/ or redistribute the software under the terms of the CeCILL v2.1 license as circulated by CEA, CNRS and INRIA at the following URL "http://www.cecill.info".
# As a counterpart to the access to the source code and rights to copy, modify and redistribute granted by the license,
# users are provided only with a limited warranty and the software's author, the holder of the economic rights, and the successive licensors have only limited liability.
# In this respect, the user's attention is drawn to the risks associated with loading, using, modifying and/or developing or reproducing the software by the user in light of its specific status of free software,
# that may mean that it is complicated to manipulate, and that also therefore means that it is reserved for developers and experienced professionals having in-depth computer knowledge.
# Users are therefore encouraged to load and test the software's suitability as regards their requirements in conditions enabling the security of their systems and/or data to be ensured  and, more generally, to use and operate it in the same conditions as regards security.
# The fact that you are presently reading this means that you have had knowledge of the CeCILL v2.1 license and that you accept its terms.
#!/usr/bin/env bash #Use your $PATH to find bash
set -o errexit #Exit on first error
set -o nounset #Error if a variable is used but nont defined
set -o pipefail #Error if a pipe fail
#Go in blaar directory
cd $(dirname $0)/..
#blc_core has to be first. It is used by all others projects
basic_libraries=(blc_core blc_channel blc_network blc_processes blc_program blc_image)
standard_projects=(blc_channels i_keyboard)
# We do not use function in purpose as 'set -o errexit' has no effect in it
for project in ${basic_libraries[@]}
do
echo "Cloning '$project':"
commandline="git submodule add https://framagit.org/blaar/$project.git bl/$project"
$commandline > /tmp/blaar/clone_$project.log || { echo "Fail cloning '$project' executing: '$commandline'"; cat /tmp/blaar/clone_$project.log; echo ; }
done
for project in ${standard_projects[@]}
do
echo "Cloning '$project':"
commandline="git submodule add https://framagit.org/blaar/$project.git"
$commandline > /tmp/blaar/clone_$project.log || { echo "Fail cloning '$project' executing: '$commandline'"; cat /tmp/blaar/clone_$project.log; echo ; }
done
# Basic Libraries And Applications for Robotics (BLAAR)
# Copyright ETIS — ENSEA, University of Cergy-Pontoise, CNRS (2011 - 2017)
# Author: Arnaud Blanchard
#
# This software is governed by the CeCILL v2.1 license under French law and abiding by the rules of distribution of free software.
# You can use, modify and/ or redistribute the software under the terms of the CeCILL v2.1 license as circulated by CEA, CNRS and INRIA at the following URL "http://www.cecill.info".
# As a counterpart to the access to the source code and rights to copy, modify and redistribute granted by the license,
# users are provided only with a limited warranty and the software's author, the holder of the economic rights, and the successive licensors have only limited liability.
# In this respect, the user's attention is drawn to the risks associated with loading, using, modifying and/or developing or reproducing the software by the user in light of its specific status of free software,
# that may mean that it is complicated to manipulate, and that also therefore means that it is reserved for developers and experienced professionals having in-depth computer knowledge.
# Users are therefore encouraged to load and test the software's suitability as regards their requirements in conditions enabling the security of their systems and/or data to be ensured  and, more generally, to use and operate it in the same conditions as regards security.
# The fact that you are presently reading this means that you have had knowledge of the CeCILL v2.1 license and that you accept its terms.
#!/usr/bin/env bash #Use your $PATH to find bash
set -o errexit #Exit on first error
set -o nounset #Error if a variable is used but nont defined
set -o pipefail #Error if a pipe fail
#we go in blaar directory
cd $(dirname $0)/..
developer_tools/clone_common_projects.sh
#On mac we add the module Quicktime for cameras
#It has been deprecated on Sierra we do not automatically install it
#git submodule add https://framagit.org/blaar/blQTKit.git
#On mac we add i_coreaudio for sound acquisition
git submodule add https://framagit.org/blaar/i_coreaudio.git
#!/bin/sh
#Basic Librairies And Applications for Robotics (BLAAR)
#Copyright ETIS — ENSEA, Université de Cergy-Pontoise, CNRS (2015 - 2017)
#This software is governed by the CeCILL v2.1 license under French law and abiding by the rules of distribution of free software.
#You can use, modify and/ or redistribute the software under the terms of the CeCILL v2.1 license as circulated by CEA, CNRS and INRIA at the following URL "http://www.cecill.info".
#As a counterpart to the access to the source code and rights to copy, modify and redistribute granted by the license, users are provided only with a limited warranty and the software's author, the holder of the economic rights, and the successive licensors have only limited liability.
#In this respect, the user's attention is drawn to the risks associated with loading, using, modifying and/or developing or reproducing the software by the user in light of its specific status of free software, that may mean that it is complicated to manipulate, and that also therefore means that it is reserved for developers and experienced professionals having in-depth computer knowledge.
#Users are therefore encouraged to load and test the software's suitability as regards their requirements in conditions enabling the security of their systems and/or data to be ensured and, more generally, to use and operate it in the same conditions as regards security.
#The fact that you are presently reading this means that you have had knowledge of the CeCILL v2.1 license and that you accept its terms.
#!/usr/bin/env bash #Use your $PATH to find bash
set -o errexit #Exit on first error
set -o nounset #Error if a variable is used but nont defined
set -o pipefail #Error if a pipe fail
#We go to the project directory and get the directory name then we go back to seach for the baar directory
cd $1
project_dir="$PWD"
project_name=$(basename $project_dir)
cd - >/dev/null #Now we have the project directory we go back in current directory without message (/dev/null)
#We go in blaar directory
cd $(dirname $0)/..
blaar_dir="$PWD"
blaar_build_dir="${blaar_dir}_build"
current_dir=$PWD
if [ $# != 3 ]
if [ $# -ne 3 ]
then
echo "You need 3 arguments but you only have $#"
echo "Usage : create_project project_directory build_directory platform"
......@@ -19,21 +42,11 @@ case "$3" in
exit 1;;
esac
build_dir=${blaar_build_dir}/$3/$1
build_dir=${blaar_build_dir}/cmake_files_$3/$project_name
project_name=`basename $1`
mkdir -p "$build_dir"
cd "$build_dir" && cmake -G"$generator" "$current_dir/$1" -DCMAKE_BUILD_TYPE="Debug" -DLIBRARY_OUTPUT_PATH=${blaar_build_dir}/Debug/lib -DCMAKE_LIBRARY_PATH="${blaar_build_dir}/Debug/lib" -DEXECUTABLE_OUTPUT_PATH=${blaar_build_dir}/Debug/bin
ERROR=$?
if [ ! $ERROR ]; then
echo
echo "Project created in $build_dir"
echo
fi
exit $ERROR
cd "$build_dir" && cmake --no-warn-unused-cli -G"$generator" "$current_dir/$1" -DCMAKE_BUILD_TYPE="Debug" -DLIBRARY_OUTPUT_PATH=${blaar_build_dir} -DEXECUTABLE_OUTPUT_PATH=${blaar_build_dir}
# Basic Libraries And Applications for Robotics (BLAAR)
# Copyright ETIS — ENSEA, University of Cergy-Pontoise, CNRS (2011 - 2017)
# Author: Arnaud Blanchard
#
# This software is governed by the CeCILL v2.1 license under French law and abiding by the rules of distribution of free software.
# You can use, modify and/ or redistribute the software under the terms of the CeCILL v2.1 license as circulated by CEA, CNRS and INRIA at the following URL "http://www.cecill.info".
# As a counterpart to the access to the source code and rights to copy, modify and redistribute granted by the license,
# users are provided only with a limited warranty and the software's author, the holder of the economic rights, and the successive licensors have only limited liability.
# In this respect, the user's attention is drawn to the risks associated with loading, using, modifying and/or developing or reproducing the software by the user in light of its specific status of free software,
# that may mean that it is complicated to manipulate, and that also therefore means that it is reserved for developers and experienced professionals having in-depth computer knowledge.
# Users are therefore encouraged to load and test the software's suitability as regards their requirements in conditions enabling the security of their systems and/or data to be ensured  and, more generally, to use and operate it in the same conditions as regards security.
# The fact that you are presently reading this means that you have had knowledge of the CeCILL v2.1 license and that you accept its terms.
#!/usr/bin/env bash #Use your $PATH to find bash
set -o errexit #Exit on first error
set -o nounset #Error if a variable is used but nont defined
set -o pipefail #Error if a pipe fail
usage(){
echo "Usage: install [-h] <project_directory> <Release|Debug|RelWithDebugInfo|MinSizeRel>"
echo " -h :Display this help."
echo
}
args=$(getopt h $*) || { usage; exit 1; }
set -- $args #update positional parameter
while [ $# -gt 0 ]
do
case "$1" in
(-h) usage; exit 0;;
(--) shift; break;;
(-*) echo "$0: error - unrecognized option $1" ; exit 1;;
(*) break;;
esac
shift
done
[ $# -ne 2 ] && { echo "$0: You need 2 arguments. You have '$@'"; usage; exit 1;}
#We go to blaar directory save it and go to the previous directory. Usefull if install.sh is not call from blaar directory
cd $(dirname $0)/..
blaar_dir="$PWD"
cd - > /dev/null # goes back without messsage
build_type=$2
#We get the directory of the project
cd $1
project_dir="$PWD"
build_type=$2
project_name=`basename $project_dir` #Name of the project is name of the directory
blaar_build_dir="${blaar_dir}_build"
build_dir="${blaar_build_dir}/cmake_files_${build_type}/${project_name}"
echo
echo " Install $1"
echo "==============="
cd $blaar_dir
./compile.sh $project_dir $build_type
cd $build_dir
#We check if there is an install target if Yes we install it.
if ninja -t targets all | grep "install: phony" ; then
sudo ninja install
else
echo "Nothing to install"
fi
# Copyright ETIS — ENSEA, Université de Cergy-Pontoise, CNRS (2011 - 2016)
# Basic Libraries And Applications for Robotics (BLAAR)
# Copyright ETIS — ENSEA, University of Cergy-Pontoise, CNRS (2011 - 2017)
# Author: Arnaud Blanchard
#
# This software is governed by the CeCILL v2.1 license under French law and abiding by the rules of distribution of free software.
# You can use, modify and/ or redistribute the software under the terms of the CeCILL v2.1 license as circulated by CEA, CNRS and INRIA at the following URL "http://www.cecill.info".
# As a counterpart to the access to the source code and rights to copy, modify and redistribute granted by the license,
......@@ -9,7 +11,14 @@
# Users are therefore encouraged to load and test the software's suitability as regards their requirements in conditions enabling the security of their systems and/or data to be ensured  and, more generally, to use and operate it in the same conditions as regards security.
# The fact that you are presently reading this means that you have had knowledge of the CeCILL v2.1 license and that you accept its terms.
{ #Bracket to be sure the file is fully loaded before excuting
#!/usr/bin/env bash #Use your $PATH to find bash
set -o errexit #Exit on first error
set -o nounset #Error if a variable is used but nont defined
set -o pipefail #Error if a pipe fail
#Bracket to be sure the file is fully loaded before excuting
{
echo
echo "Standard blaar install"
echo "======================"
......
#!/bin/sh
# Basic Libraries And Applications for Robotics (BLAAR)
# Copyright ETIS — ENSEA, University of Cergy-Pontoise, CNRS (2011 - 2017)
# Author: Arnaud Blanchard
#
# This software is governed by the CeCILL v2.1 license under French law and abiding by the rules of distribution of free software.
# You can use, modify and/ or redistribute the software under the terms of the CeCILL v2.1 license as circulated by CEA, CNRS and INRIA at the following URL "http://www.cecill.info".
# As a counterpart to the access to the source code and rights to copy, modify and redistribute granted by the license,
# users are provided only with a limited warranty and the software's author, the holder of the economic rights, and the successive licensors have only limited liability.
# In this respect, the user's attention is drawn to the risks associated with loading, using, modifying and/or developing or reproducing the software by the user in light of its specific status of free software,
# that may mean that it is complicated to manipulate, and that also therefore means that it is reserved for developers and experienced professionals having in-depth computer knowledge.
# Users are therefore encouraged to load and test the software's suitability as regards their requirements in conditions enabling the security of their systems and/or data to be ensured  and, more generally, to use and operate it in the same conditions as regards security.
# The fact that you are presently reading this means that you have had knowledge of the CeCILL v2.1 license and that you accept its terms.
#!/usr/bin/env bash #Use your $PATH to find bash
set -o errexit #Exit on first error
set -o nounset #Error if a variable is used but nont defined
set -o pipefail #Error if a pipe fail
usage(){
echo "usage: doc.sh [-c] [-h] <project dir>"
echo "usage: doc_api.sh [-c] [-h] <project dir>"
echo
echo "-c document the plain c version (c++ by default)"
echo "-h display this help"
echo
}
[ $1 ] || { echo "Missing project directory."; usage; exit 1; }
[ $# -lt 2 ] && { echo "Missing project directory."; usage; exit 1; }
target="cpp_api"
......
#!/bin/bash
# Basic Libraries And Applications (blaa)
# Copyright ETIS — ENSEA, Université de Cergy-Pontoise, CNRS (2011 - 2015)
# Basic Libraries And Applications for Robotics (BLAAR)
# Copyright ETIS — ENSEA, University of Cergy-Pontoise, CNRS (2011 - 2017)
# Author: Arnaud Blanchard
#
# This software is governed by the CeCILL v2.1 license under French law and abiding by the rules of distribution of free software.
......@@ -12,97 +11,70 @@
# Users are therefore encouraged to load and test the software's suitability as regards their requirements in conditions enabling the security of their systems and/or data to be ensured  and, more generally, to use and operate it in the same conditions as regards security.
# The fact that you are presently reading this means that you have had knowledge of the CeCILL v2.1 license and that you accept its terms.
usage()
{
echo "Usage: install [-b directory] [-h] [-i diectory] <all>|<project_directory> [Release|Debug|RelWithDebugInfo|MinSizeRel]"
echo " -b directory :Directory to create the build. (default: $build_dir)"
#!/usr/bin/env bash #Use your $PATH to find bash
set -o errexit #Exit on first error
set -o nounset #Error if a variable is used but nont defined
set -o pipefail #Error if a pipe fail
usage(){
echo
echo "Usage: install [-h] [-v verbose] <all>|<project_directory> [Release|Debug|RelWithDebugInfo|MinSizeRel]"
echo " -h :Display this help."
echo " -q :Quiet mode"
# echo " -i directory :Directory to install the binaries. Default: $install_prefix"
echo
}
install_dir="/usr/local"
VERBOSE=0
set -- $(getopt b:hi:q "$@")
args=$(getopt hv $*) || { usage; exit 1; }
set -- $args #update positional parameter
while [ $# -gt 0 ]
do
case "$1" in
(-b) build_dir="$2"; shift;;
(-h) usage; exit 0;;
# (-i) install_dir=$PWD/$2; install_prefix="-DCMAKE_INSTALL_PREFIX=$install_dir"; shift;;
(-q) QUIET=-q;;
(-v) echo "Verbose mode"; VERBOSE=1;;
(--) shift; break;;
(-*) echo "$0: error - unrecognized option $1" 1>&2; exit 1;;
(-*) echo "$0: error - unrecognized option $1" ; exit 1;;
(*) break;;
esac
shift
done
[ $1 ] || { echo "You need at least an argument"; usage; exit 1; }
if [ "$2" ]; then
case "$2" in
Release|Debug|RelWithDebugInfo|MinSizeRel) build_type="$2";;
*)echo "Unknown build type '$2'">&2; usage;;
esac
else build_type="Release"