Files
qt5-legatus-legacy/Lts/Tools/OnlineHelp/get_onlinehelp_filename.sh
T
2026-08-13 18:33:10 +02:00

48 lines
1012 B
Bash
Executable File

#
# 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