Commit 6366fd91 authored by Arnaud Blanchard's avatar Arnaud Blanchard

Simplify and fixes bash for eclipse_create_project.sh xcode_project.sh

parent abb20403
#!/bin/sh
# Basic Library for C/C++ (blclib)
# Copyright ETIS — ENSEA, Université de Cergy-Pontoise, CNRS (2011 - 2014)
# Basic Libraries And Applications for Robotics (BLAAR)
# Copyright ETIS — ENSEA, University of Cergy-Pontoise, CNRS (2011 - 2017)
# Author: Arnaud Blanchard
# This software is a computer program whose purpose is to simulate neural networks and control robots or simulations.
#
# 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,
......@@ -12,9 +11,24 @@
# 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.
current_dir=`pwd`
parent_dir=`dirname $current_dir`
build_dir="$parent_dir/`basename $current_dir`_build"
#!/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)
parent_dir=$(dirname $PWD)
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"
build_dir="$blaar_build_dir"
if [ $# != 1 ]
then
......@@ -23,7 +37,9 @@ echo "Usage : xcode_project project_directory"
exit 1
fi
developer_tools/create_project.sh $1 $build_dir eclipse && echo "eclipse -> file -> import -> general -> existing project -> root directory -> browse -> \n$build_dir/eclipse/$1"
developer_tools/create_project.sh $1 $blaar_build_dir eclipse
echo "eclipse -> file -> import -> general -> existing project -> root directory -> browse ->"
echo "$build_dir/cmake_files_eclipse/$project_name"
echo
......@@ -23,7 +23,7 @@ cd - >/dev/null #Now we have the project directory we go back in current directo
cd $(dirname $0)
blaar_dir="$PWD"
blaar_build_dir="${blaar_dir}_build"
build_dir="$blaar_build_dir"
if [ $# -ne 1 ]
then
......@@ -32,5 +32,5 @@ echo "Usage : xcode_project <project_directory>"
exit 1
fi
developer_tools/create_project.sh $1 $build_dir xcode
developer_tools/create_project.sh $project_dir $blaar_build_dir xcode
open $build_dir/cmake_files_xcode/$project_name/$project_name.xcodeproj
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