Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
G
gnss
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Model registry
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
mobile_robotics
wolf_projects
wolf_lib
plugins
gnss
Commits
0167b88e
Commit
0167b88e
authored
6 years ago
by
Joaquim Casals Buñuel
Browse files
Options
Downloads
Patches
Plain Diff
Plugin creating script + minor CMakeList fix
parent
a741502a
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
CMakeLists.txt
+1
-0
1 addition, 0 deletions
CMakeLists.txt
wolf_scripts/create_plugin.sh
+69
-18
69 additions, 18 deletions
wolf_scripts/create_plugin.sh
with
70 additions
and
18 deletions
CMakeLists.txt
+
1
−
0
View file @
0167b88e
...
@@ -411,6 +411,7 @@ SET(HDRS_DTASSC
...
@@ -411,6 +411,7 @@ SET(HDRS_DTASSC
include/base/association/association_node.h
include/base/association/association_node.h
include/base/association/association_tree.h
include/base/association/association_tree.h
include/base/association/association_nnls.h
include/base/association/association_nnls.h
include/base/association/matrix.h
)
)
SET
(
HDRS_CORE
SET
(
HDRS_CORE
...
...
This diff is collapsed.
Click to expand it.
wolf_scripts/create_plugin.sh
+
69
−
18
View file @
0167b88e
...
@@ -2,18 +2,31 @@
...
@@ -2,18 +2,31 @@
# $1 path to the root of the plugin
# $1 path to the root of the plugin
# $2 name of the plugin
# $2 name of the plugin
# $3 files to be moved
# $3 files to be moved
# Create the target directory
# if [ -d $1 ];
#Generate the necessary dirs
# if [ ! -d $1 ];
# then
# then
#
rm -rf
$1
#
mkdir
$1
# fi
# fi
#Generate the necessary dirs
# if [ ! -d $1/include/$2 ];
if
[
!
-d
$1
/include/
$2
]
;
# then
# # mkdir $1/include
# mkdir $1/include/$2
# fi
# if [ ! -d $1/src ];
# then
# mkdir $1/src
# fi
root_dir
=
$(
echo
$1
| rev |
cut
-d
'/'
-f
2- | rev
)
if
[
!
-d
$root_dir
/
$2
]
;
then
then
mkdir
$1
/include/
$2
cp
-a
../Skeleton
$root_dir
mv
$root_dir
/Skeleton
$root_dir
/
$2
mv
$root_dir
/
$2
/include/skeleton
$root_dir
/
$2
/include/
$2
fi
fi
for
folder
in
capture constraint feature landmark processor sensor
;
do
for
folder
in
capture
factor
feature landmark processor sensor yaml
;
do
if
[
!
-d
$1
/include/
$2
/
$folder
]
;
if
[
!
-d
$1
/include/
$2
/
$folder
]
;
then
then
mkdir
$1
/include/
$2
/
$folder
mkdir
$1
/include/
$2
/
$folder
...
@@ -32,17 +45,38 @@ for file in $(cat $3); do
...
@@ -32,17 +45,38 @@ for file in $(cat $3); do
line
=
$(
ag
"HDRS_"
${
folder
^^
}
$1
/CMakeLists.txt |
cut
-d
':'
-f
1 |
head
-1
)
line
=
$(
ag
"HDRS_"
${
folder
^^
}
$1
/CMakeLists.txt |
cut
-d
':'
-f
1 |
head
-1
)
line
=
$((
$line
+
1
))
line
=
$((
$line
+
1
))
echo
$line
" && "
$file
" && "
$folder
" && "
$suffix
echo
$line
" && "
$file
" && "
$folder
" && "
$suffix
sed
-i
""
$line
"i
$head
/
$2
/
$folder
/
$suffix
"
$1
/CMakeLists.txt
if
[
"
$suffix
"
=
""
]
;
cp
$file
$1
/
$head
/
$2
/
$folder
/
$suffix
then
else
line
=
$(
ag
"HDRS_BASE"
$1
/CMakeLists.txt |
cut
-d
':'
-f
1 |
head
-1
)
line
=
$((
$line
+
1
))
suffix
=
$folder
sed
-i
""
$line
"i
$head
/
$2
/
$suffix
"
$1
/CMakeLists.txt
cp
$file
$1
/
$head
/
$2
/
$suffix
else
sed
-i
""
$line
"i
$head
/
$2
/
$folder
/
$suffix
"
$1
/CMakeLists.txt
cp
$file
$1
/
$head
/
$2
/
$folder
/
$suffix
fi
elif
[
"
$head
"
=
"src"
]
;
then
folder
=
$(
echo
$file
|
cut
-d
'/'
-f
2
)
folder
=
$(
echo
$file
|
cut
-d
'/'
-f
2
)
suffix
=
$(
echo
$file
|
cut
-d
'/'
-f
3-
)
suffix
=
$(
echo
$file
|
cut
-d
'/'
-f
3-
)
ag
"SRCS_"
$folder
$1
/CMakeLists.txt
#
ag "SRCS_"$folder $1/CMakeLists.txt
line
=
$(
ag
"SRCS_"
${
folder
^^
}
$1
/CMakeLists.txt |
cut
-d
':'
-f
1 |
head
-1
)
line
=
$(
ag
"SRCS_"
${
folder
^^
}
$1
/CMakeLists.txt |
cut
-d
':'
-f
1 |
head
-1
)
line
=
$((
$line
+
1
))
line
=
$((
$line
+
1
))
echo
$line
" && "
$file
" && "
$folder
" && "
$suffix
echo
$line
" && "
$file
" && "
$folder
" && "
$suffix
sed
-i
""
$line
"i
$file
"
$1
/CMakeLists.txt
if
[
"
$suffix
"
=
""
]
;
cp
$file
$1
/
$head
/
$folder
/
$suffix
then
line
=
$(
ag
"SRCS_BASE"
$1
/CMakeLists.txt |
cut
-d
':'
-f
1 |
head
-1
)
line
=
$((
$line
+
1
))
suffix
=
$folder
sed
-i
""
$line
"i
$file
"
$1
/CMakeLists.txt
cp
$file
$1
/
$head
/
$suffix
else
sed
-i
""
$line
"i
$file
"
$1
/CMakeLists.txt
cp
$file
$1
/
$head
/
$folder
/
$suffix
fi
else
cp
$file
$1
/
$file
fi
fi
done
done
for
f
in
$(
cat
$3
)
;
do
for
f
in
$(
cat
$3
)
;
do
...
@@ -61,15 +95,32 @@ for f in $(cat $3); do
...
@@ -61,15 +95,32 @@ for f in $(cat $3); do
then
then
folder
=
$(
echo
$ff
|
cut
-d
'/'
-f
3
)
folder
=
$(
echo
$ff
|
cut
-d
'/'
-f
3
)
suffix
=
$(
echo
$ff
|
cut
-d
'/'
-f
4-
)
suffix
=
$(
echo
$ff
|
cut
-d
'/'
-f
4-
)
new_path
=
$1
/
$head
/
$2
/
$folder
/
$suffix
if
[
"
$suffix
"
=
""
]
;
then
new_path
=
$1
/
$head
/
$2
/
$folder
sed
-i
-E
"s@(#include[[:space:]]+
\"
)base(
\/
$inc
\"
)@
\1
$2
\2
@g"
$new_path
else
new_path
=
$1
/
$head
/
$2
/
$folder
/
$suffix
sed
-i
-E
"s@(#include[[:space:]]+
\"
)base(
\/
$inc
\"
)@
\1
$2
\2
@g"
$new_path
fi
# sed -n -E "s@(#include[[:space:]]+\")base(\/$inc\")@\1$2\2@pg" $new_path
# sed -n -E "s@(#include[[:space:]]+\")base(\/$inc\")@\1$2\2@pg" $new_path
sed
-i
-E
"s@(#include[[:space:]]+
\"
)base(
\/
$inc
\"
)@
\1
$2
\2
@g"
$new_path
# sed -i -E "s@(#include[[:space:]]+\")base(\/$inc\")@\1$2\2@g" $new_path
else
elif
[
"
$head
"
=
"src"
]
;
then
folder
=
$(
echo
$ff
|
cut
-d
'/'
-f
2
)
folder
=
$(
echo
$ff
|
cut
-d
'/'
-f
2
)
suffix
=
$(
echo
$ff
|
cut
-d
'/'
-f
3-
)
suffix
=
$(
echo
$ff
|
cut
-d
'/'
-f
3-
)
new_path
=
$1
/
$head
/
$folder
/
$suffix
# sed -n -E "s@(#include[[:space:]]+\")base(\/$inc\")@\1$2\2@pg" $new_path
# sed -n -E "s@(#include[[:space:]]+\")base(\/$inc\")@\1$2\2@pg" $new_path
sed
-i
-E
"s@(#include[[:space:]]+
\"
)base(
\/
$inc
\"
)@
\1
$2
\2
@g"
$new_path
if
[
"
$suffix
"
=
""
]
;
then
new_path
=
$1
/
$head
/
$folder
sed
-i
-E
"s@(#include[[:space:]]+
\"
)base(
\/
$inc
\"
)@
\1
$2
\2
@g"
$new_path
else
new_path
=
$1
/
$head
/
$folder
/
$suffix
sed
-i
-E
"s@(#include[[:space:]]+
\"
)base(
\/
$inc
\"
)@
\1
$2
\2
@g"
$new_path
fi
else
# sed -n -E "s@(#include[[:space:]]+\")base(\/$inc\")@\1$2\2@pg" $new_path
sed
-i
-E
"s@(#include[[:space:]]+
\"
)base(
\/
$inc
\"
)@
\1
$2
\2
@g"
$1
/
$ff
fi
fi
done
done
done
done
\ No newline at end of file
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment