Skip to content

Commit

Permalink
added bash script to count functions to be documented
Browse files Browse the repository at this point in the history
  • Loading branch information
zanellia committed Mar 28, 2019
1 parent e174bdf commit 0ab3a61
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions docu_mission.sh
@@ -0,0 +1,24 @@
#!/bin/bash
nfunctions=0
find ./build/acados/CMakeFiles/acados.dir -type d | while read directory
do
printf "\n\n----------------------------------------------------------\n"
printf "directory: $directory"
printf "\n----------------------------------------------------------\n"
for file in $directory/* ; do
if [ ${file: -2} == ".o" ]
then
printf "\n"
echo "-> file: $file"
printf "\n"
nm ${file} | grep "T "
printf "\n"
echo "number of functions to be documented: "
nm ${file} | grep "T " | grep -v " _" | wc -l
read x words chars filename <<< $(nm ${file} | grep "T " | grep -v " _" | wc )
nfunctions=$((nfunctions+x))
printf "\n"
fi
done <<< $(find tmp -type f)
printf "\n\ntotal number of functions: $nfunctions\n\n"
done

0 comments on commit 0ab3a61

Please sign in to comment.