Skip to content
Snippets Groups Projects
Commit 03953b37 authored by Alejandro Lopez Gestoso's avatar Alejandro Lopez Gestoso
Browse files

Fixed a bug on new_project.sh related to -p argument (project_description).

parent b18631eb
No related branches found
No related tags found
No related merge requests found
......@@ -29,7 +29,7 @@ Execute the *new_project.sh* script with the following parameters:
* **-n project\_name**: this parameter is required. It specifies the name of the shared library or the binary file to be generate by the project. **This parameter must not have any whitespace characters**.
* **-i comma\_separated\_dependencies**: this parameter is optional. It specifies a set of dependencies of the library or application being generated. These depedencies will be automatically included inside the CMake structure. Only dependencies supported by the CMake framework are currently supported.
* **-d comma\_separated\_dependencies**: this parameter is optional. It specifies a set of dependencies of the library or application being generated. These depedencies will be automatically included inside the CMake structure. Only dependencies supported by the CMake framework are currently supported.
* **-g**: this parameters is optional. Is specifies whether the test strcture is to be included into the project or not. This includes the necessaty CMake files to download and locally build the google test software and a basic test file for the generated project.
......
......@@ -3,6 +3,8 @@ project_name {#mainpage}
## Description
project_description
## Dependencies
This package requires of the following system libraries and packages
......
......@@ -2,7 +2,7 @@
DEP=
TYPE=
PROJECT_NAME=
PROJECT_DESC=
NAME=
TEST=0
......@@ -13,7 +13,7 @@ do
TYPE=$OPTARG
;;
p)
PROJECT_NAME=$OPTARG
PROJECT_DESC=$OPTARG
;;
n)
NAME=$OPTARG
......@@ -41,9 +41,9 @@ case $TYPE in
;;
esac
if [ "$PROJECT_NAME" ]
if [ "$NAME" ]
then
echo "Generating folder structure for project $PROJECT_NAME ..."
echo "Generating folder structure for project $NAME ..."
else
echo "No project name provided, aborting ..."
exit
......@@ -152,9 +152,11 @@ sed 's/author_email/labrobotica@iri.upc.edu/g' <ReadMe_template.md >tmp1.md
#set the author's name on the ReadMe.txt disclaimer file
sed 's/author_name/IRI labrobotics/g' <tmp1.md >tmp2.md
#Set the project name on the ReadMe.txt disclaimer file
sed 's/project_name/'"$PROJECT_NAME"'/g' <tmp2.md >./ReadMe.md
sed 's/project_description/'"$PROJECT_DESC"'/g' <tmp2.md >tmp3.md
sed 's/project_name/'"$NAME"'/g' <tmp3.md >./ReadMe.md
rm tmp1.md
rm tmp2.md
rm tmp3.md
rm ReadMe_template.md
#Set the project name on the CMakeLists.txt script file
......@@ -169,7 +171,7 @@ rm CMakeLists_test_template.txt
rm CMakeLists_template.txt
#Set the project name on the doxygen_project_name.dox sript file
sed 's/project_name/'"$PROJECT_NAME"'/g' <doxygen_project_name_template.conf >./doc/doxygen_project_name.conf
sed 's/project_name/'"$NAME"'/g' <doxygen_project_name_template.conf >./doc/doxygen_project_name.conf
rm doxygen_project_name_template.conf
mv doxygen_template.conf ./doc/doxygen.conf
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment