Commit 47bd273d authored by Arnaud Blanchard's avatar Arnaud Blanchard
Browse files

Renmae and improve secutity of bash developer_tools

parent 03ad6298
# 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
}
......@@ -28,13 +28,13 @@ 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 ; }
$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 ; }
$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
......@@ -53,16 +53,19 @@ blaar_build_dir="${blaar_dir}_build"
build_dir="${blaar_build_dir}/${build_type}/cmake_files/${project_name}"
echo
echo " Install $0"
echo " Install $1"
echo "==============="
cd $blaar_dir
./compile.sh $project_dir $build_type
cd $build_dir
ninja -t targets all | grep "install: phony" && echo "Install"
#We check if there is an install target if Yes we install it.
if ninja -t targets all | grep --quiet "install: phony"; then
sudo ninja install || echo "Fail intalling '$project_pathcd'"
if ninja -t targets all | grep "install: phony" ; then
sudo ninja install || echo "Fail intalling '$project_path'"
else
echo "Nothing to install"
fi
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