From 0ab3a610d8c48876b6aa836620d655c8079ae049 Mon Sep 17 00:00:00 2001 From: "andrea.zanelli" Date: Thu, 28 Mar 2019 14:45:43 +0100 Subject: [PATCH] added bash script to count functions to be documented --- docu_mission.sh | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100755 docu_mission.sh diff --git a/docu_mission.sh b/docu_mission.sh new file mode 100755 index 0000000000..cfdbff9b0c --- /dev/null +++ b/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