scripts/wrapper.in
author "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Fri Aug 28 11:57:29 2009 +0200 (2009-08-28)
changeset 1489 8c45efc97e7f
parent 1402 146c62142e1b
child 1960 8307ceabe5c0
permissions -rw-r--r--
duma: fix downloading by forcing extension to .tar.gz

Downoading a non-existing file from sourceforge gives you a "200 OK"
and an index.html. As we try to retrieve a .tar.bz2 first, and duma
is bundled in a .tar.gz, we won't get appropriate content, so
just force the extension to avoid the problem.

Thanks to Ingmar Schraub <is@eseco.de> for pointing out the issue.
     1 #!/bin/sh
     2 
     3 canonicalizedname=$(readlink -nm "${0}")
     4 dirname="$(dirname "${canonicalizedname}")"
     5 basename="$(basename "${canonicalizedname}")"
     6 
     7 ld_lib_path="$(dirname "${dirname}")/lib"
     8 
     9 case ":${LD_LIBRARY_PATH}:" in
    10     *":${ld_lib_path}:"*)   ;;
    11     *)  LD_LIBRARY_PATH="${ld_lib_path}${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}";;
    12 esac
    13 
    14 export LD_LIBRARY_PATH
    15 exec "${dirname}/.${basename}" "$@"