# # Script # @RDE_HEADER@ # $Id$ # $HeadURL$ # $Author$ # Created by Jens Heilmann, SLTE, 2020-11-11 # functionName="setOnlineHelpFilename" # default path is ../../.. (current path: Lts/Tools/OnlineHelp) if [[ -z "$1" ]]; then rootPath="../../.." else rootPath="$1" if [[ ! -d "$rootPath" ]]; then echo \""$rootPath"\" is not a valid path... exit fi fi echo getting content from "$functionName" functions... echo looking in "$rootPath" find "$rootPath" -name "*.cpp" -o -name "*.h" | while read -r currentFile; do grep -nH "$functionName" "$currentFile" | while read -r currentGrep; do fileAndRow=$(sed 's/:[^:]*//2g' <<<"$currentGrep") message=$(sed 's/^[^"]*"\([^"]*\)".*/\1/' <<<"$currentGrep") if [[ $message == *"const QString &fileName"* ]]; then continue fi output=$"${fileAndRow};${message}" echo "$output" done done echo ...done