Mentions légales du service
Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
faust
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD 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
faust group
faust
Commits
caff9e8e
Commit
caff9e8e
authored
4 years ago
by
hhakim
Browse files
Options
Downloads
Patches
Plain Diff
Add a bash script to count C/C++, Python and Matlab lines of code (useful for APP deposit).
parent
500889df
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
misc/count_lines.sh
+22
-0
22 additions, 0 deletions
misc/count_lines.sh
with
22 additions
and
0 deletions
misc/count_lines.sh
0 → 100755
+
22
−
0
View file @
caff9e8e
#!/usr/bin/env bash
# This script allows to count lines of code as part of three sets: 1. C++ 2. Matlab 3. Python
# The goal is to keep the track of how the code is counted for the APP deposit
FAUST_PATH
=
$1
[[
-z
"
$FAUST_PATH
"
||
!
-d
"
$FAUST_PATH
"
]]
&&
echo
"USAGE:
$0
<faust_path> [-v]
\n
-v: verbose mode (all files are listed)."
&&
exit
1
[[
$*
=
*
-v
*
]]
&&
VERBOSE
=
1
||
VERBOSE
=
0
echo
"C++ code number of lines:"
wc
-l
$(
find
"
$FAUST_PATH
/src"
"
$FAUST_PATH
/misc/test/src/C++"
"
$FAUST_PATH
/wrapper/matlab/src/"
"
$FAUST_PATH
/wrapper/python/src/"
"
$FAUST_PATH
/gpu_mod/src"
|
grep
-v
"matlab.*Cplx.cpp
$\
|matlab.*Real.cpp"
|
grep
-i
"
\(
.hpp
\|
.cpp
\|
.cpp.in
\|
.hpp.in
\)
$"
)
|
([[
!
$VERBOSE
=
1
]]
&&
tail
-1
||
tee
/dev/null
)
echo
"Python code number of lines:"
wc
-l
$(
find
"
$FAUST_PATH
/wrapper/python"
"
$FAUST_PATH
/misc/test/src/Python"
-name
"*.py"
-o
-name
"*.pyx"
-o
-name
"*.pyx.in"
-o
-name
"*.py"
)
|
(
[[
!
$VERBOSE
=
1
]]
&&
tail
-1
||
tee
-a
/dev/null
)
echo
"Matlab code number of lines:"
wc
-l
$(
find
"
$FAUST_PATH
/wrapper/matlab"
"
$FAUST_PATH
/misc/test/src/Matlab"
-name
"*.m.in"
-o
-name
"*.m"
)
|
([[
!
$VERBOSE
=
1
]]
&&
tail
-1
||
tee
-a
/dev/null
)
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