Skip to content
Snippets Groups Projects
Commit 4613e86e authored by Pierre-Alain Loizeau's avatar Pierre-Alain Loizeau Committed by Florian Uhlig
Browse files

Fix new checklibs feature to support both mawk and gawk variants of awk

parent 2615d550
No related branches found
No related tags found
1 merge request!2064Add check of installed libraries
Pipeline #33682 passed
......@@ -25,17 +25,24 @@ for lib in $all_libs; do
first_class=""
rootmap_file="${lib%%".so"}".rootmap
if [ -f "${rootmap_file}" ]; then
rootmap_defs_token="\[ lib"
if [[ ${rootmap_file} == *"libHal"* ]]; then
# Commented out for now as lead to missing headers detection in 60% of HAL libraries (9/14)
# rootmap_defs_token="\[ Hal"
fi
# Need 4 * \ because gawk (GNU awk, Ubuntu 22.04) parse such strings twice before trying to use the string...
# So \\\\ becomes \\ which becomes \
# => Seems to still work with mawk (Mike's awk, debian 10) on run2, so ok like this?
rootmap_defs_token="\\\\[ lib"
# if [[ ${rootmap_file} == *"libHal"* ]]; then
# # Commented out for now as lead to missing headers detection in 60% of HAL libraries (9/14)
# rootmap_defs_token="\\\\[ Hal"
# fi
first_class=$(awk -v token="${rootmap_defs_token}" '$0 ~ token ,0' ${rootmap_file} | grep -m1 "${start_token_class}" | tr -d ';')
first_class="${first_class##"${start_token_class}"}"
# Printouts commented out to limit spam in test logs
# FIXME: make it a "-v" option
# echo "Loading the library ${lib} and parsing it for class ${first_class}"
#else
# echo "Loading the library ${lib}"
fi
# echo "Loading the library ${lib} and parsing it for class ${first_class}"
root -l -q -b "${SCRIPTDIR}/loadlib.C(\"${lib}\", \"${first_class}\")" &> ${tmpfile}
retval=$?
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment