1.1 --- a/scripts/build/debug/duma.in Mon Jun 30 20:37:14 2008 +0000
1.2 +++ b/scripts/build/debug/duma.in Mon Aug 01 00:16:12 2011 +0200
1.3 @@ -13,7 +13,18 @@
1.4 shift
1.5 ;;
1.6 -off)
1.7 - LD_PRELOAD="${LD_PRELOAD//${LIBDUMA_SO}/}"
1.8 + # We use a suposedly POSIX-compliant shell: /bin/sh
1.9 + # -> we can't use "${LD_PRELOAD//${LIBDUMA_SO}/}", it's not POSIX
1.10 + # We don't know if sed will be present on the target
1.11 + # -> we can't use $(echo "${LD_PRELOAD}" |sed -r -e "s|${LIBDUMA_SO}||;")
1.12 + # So, iterate through LD_PRELOAD, and keep only those libs that
1.13 + # are not "${LIBDUMA_SO}"
1.14 + old_LD_PRELOAD="${LD_PRELOAD}"
1.15 + LD_PRELOAD=
1.16 + for lib in ${old_LD_PRELOAD}; do
1.17 + [ "${lib}" = "${LIBDUMA_SO}" ] || LD_PRELOAD="${LD_PRELOAD} ${lib}"
1.18 + done
1.19 + unset old_LD_PRELOAD
1.20 shift
1.21 ;;
1.22 -show)