scripts/addToolsVersion: properly handle .in vs. .in.2
While most components have their version in the .in file, some
have it in the .in.2 (eg. elf2flt).
Currently, to handle this case, we indiscriminately munge both files,
but this is wrong: in the elf2flt case, if we add a binutils version,
we do not want it to be added to elf2flt, and conversely.
So, for each tool, we need to explicitly know what file to munge.
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
2 # (C) 2008 Yann E. MORIN <yann.morin.1998@free.fr>
3 # Licensed under the GPL v.2
9 case "${LD_PRELOAD}" in
11 *) LD_PRELOAD="${LIBDUMA_SO} ${LD_PRELOAD}";;
16 # We use a suposedly POSIX-compliant shell: /bin/sh
17 # -> we can't use "${LD_PRELOAD//${LIBDUMA_SO}/}", it's not POSIX
18 # We don't know if sed will be present on the target
19 # -> we can't use $(echo "${LD_PRELOAD}" |sed -r -e "s|${LIBDUMA_SO}||;")
20 # So, iterate through LD_PRELOAD, and keep only those libs that
21 # are not "${LIBDUMA_SO}"
22 old_LD_PRELOAD="${LD_PRELOAD}"
24 for lib in ${old_LD_PRELOAD}; do
25 [ "${lib}" = "${LIBDUMA_SO}" ] || LD_PRELOAD="${LD_PRELOAD} ${lib}"
31 case "${LD_PRELOAD}" in
32 *${LIBDUMA_SO}*) echo "duma is enabled";;
33 *) echo "duma is disabled";;
41 Sets, unsets or show DUMA usage.
42 $0 <executable [arg...]>
43 Execute 'executable' (with arguments 'args') using DUMA.
45 false # Don't 'exit', we could well be source'd