calcul de MYTRUESELF

This commit is contained in:
Jephté Clain 2025-08-20 13:01:26 +04:00
parent 368de874b4
commit 94feff75db

View File

@ -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}}"