diff --git a/bash/src/base.init.sh b/bash/src/base.init.sh index de5ae8c..2104e56 100644 --- a/bash/src/base.init.sh +++ b/bash/src/base.init.sh @@ -21,6 +21,12 @@ if [ -z "$NULIB_NO_INIT_ENV" ]; then fi [ -n "$NULIBDIR" ] || NULIBDIR="$MYDIR" + # Si le script courant est un lien, calculer le répertoire destination + if [ -n "$MYTRUESELF" -a -n "$MYSELF" ]; then + MYTRUESELF="$(readlink -f "$MYSELF")" + MYTRUEDIR="$(dirname -- "$MYTRUESELF")" + fi + # Repertoire temporaire [ -z "$TMPDIR" -a -d "$HOME/tmp" ] && TMPDIR="$HOME/tmp" [ -z "$TMPDIR" ] && TMPDIR="${TMP:-${TEMP:-/tmp}}"