Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
O
OpenSK
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Model registry
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
koenigl2
OpenSK
Commits
cab6f0c1
Commit
cab6f0c1
authored
5 years ago
by
Guillaume Endignoux
Browse files
Options
Downloads
Patches
Plain Diff
Add a comma_separated function to avoid duplicated code.
parent
5951e039
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
deploy.sh
+9
-12
9 additions, 12 deletions
deploy.sh
with
9 additions
and
12 deletions
deploy.sh
+
9
−
12
View file @
cab6f0c1
...
...
@@ -148,15 +148,19 @@ build_app_padding () {
)
| xxd
-p
-r
>
"
${
tab_folder
}
/padding.bin"
}
build_app
()
{
comma_separated
()
{
# Flatten the array
# This is equivalent to the following python snippet: ' '.join(arr).replace(' ', ',')
local
feature_
list
=
$(
IFS
=
$'
\n
'
;
echo
"
$@
"
)
if
[
"X
${
feature_
list
}
"
!=
"X"
]
local
list
=
$(
IFS
=
$'
\n
'
;
echo
"
$@
"
)
if
[
"X
${
list
}
"
!=
"X"
]
then
feature_list
=
"
${
feature_
list
// /,
}
"
feature_list
=
"
${
list
// /,
}
"
fi
echo
${
list
}
}
build_app
()
{
local
feature_list
=
"
$(
comma_separated
$@
)
"
cargo build
\
--release
\
--target
=
thumbv7em-none-eabi
\
...
...
@@ -176,14 +180,7 @@ build_app () {
}
build_crypto_bench
()
{
# Flatten the array
# This is equivalent to the following python snippet: ' '.join(arr).replace(' ', ',')
local
feature_list
=
$(
IFS
=
$'
\n
'
;
echo
"
$@
"
)
if
[
"X
${
feature_list
}
"
!=
"X"
]
then
feature_list
=
"
${
feature_list
// /,
}
"
fi
local
feature_list
=
"
$(
comma_separated
$@
)
"
cargo build
\
--release
\
--target
=
thumbv7em-none-eabi
\
...
...
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