scripts/wrapper.in
author "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Sun Aug 02 20:06:44 2009 +0200 (2009-08-02)
changeset 1446 0a44fc4d6bd0
parent 1401 604c5c80e24a
child 1434 7e7290acccc1
permissions -rw-r--r--
[config] Allow user to specify custom CONFIG_SHELL

In case the shell the user wants to use as CONFIG_SHELL is located in a
weird place (eg. /opt/bash/bin/bash), or is weirdly named (eg. bash-4),
let the user enter the patch to the shell.
     1 #!/bin/sh
     2 
     3 dirname="$(dirname "${0}")"
     4 basename="$(basename "${0}")"
     5 
     6 ld_lib_path="$(dirname "${dirname}")/lib"
     7 
     8 case ":${LD_LIBRARY_PATH}:" in
     9     *":${ld_lib_path}:"*)   ;;
    10     *)  LD_LIBRARY_PATH="${ld_lib_path}${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}";;
    11 esac
    12 
    13 export LD_LIBRARY_PATH
    14 exec "${dirname}/.${basename}" "$@"