.sh wrappers

Alexander Neundorf neundorf at kde.org
Sun Apr 30 13:42:50 CEST 2006


On Sunday 30 April 2006 13:32, David Faure wrote:
> $ cat bin/genembed.sh
> #!/bin/sh
> # created by cmake, don't edit, changes will be lost
> LD_LIBRARY_PATH=/devel/kde/build/4/kdelibs4_snapshot/lib/./:/devel/kde/inst
>/kde4/lib:/devel/kde/build/4/kdelibs4_snapshot/lib/.:/devel/kde/src/4/qt-cop
>y/lib${LD_LIBRARY_PATH+:LD_LIBRARY_PATH}
> "/devel/kde/build/4/kdelibs4_snapshot/bin/genembed" "$@"
>
> Are you sure about the ${LD_LIBRARY_PATH+:LD_LIBRARY_PATH} construct?
> sh -x says:
> +
> LD_LIBRARY_PATH=/devel/kde/build/4/kdelibs4_snapshot/lib/./:/devel/kde/inst
>/kde4/lib:/devel/kde/build/4/kdelibs4_snapshot/lib/.:/devel/kde/src/4/qt-cop
>y/lib:LD_LIBRARY_PATH
>
> and indeed
> $ echo ${LD_LIBRARY_PATH+:LD_LIBRARY_PATH}
>
> :LD_LIBRARY_PATH
>
> Shouldn't this be ${LD_LIBRARY_PATH+:$LD_LIBRARY_PATH} ? (with a $ in front
> of the var?) bash and zsh (and sh symlinked to bash) seem to agree on this.

I don't know this syntax, Dirk committed this change:
http://websvn.kde.org/trunk/KDE/kdelibs/cmake/modules/kde4_exec_via_sh.cmake?rev=528894&view=log

Bye
Alex
-- 
Work: alexander.neundorf AT jenoptik.com - http://www.jenoptik-los.de
Home: neundorf AT kde.org                - http://www.kde.org
      alex AT neundorf.net               - http://www.neundorf.net


More information about the Kde-buildsystem mailing list