maj chemin pour phpwrappers

This commit is contained in:
Jephté Clain 2025-10-06 13:09:02 +04:00
parent 90ca62984d
commit c1c369f554

View File

@ -52,7 +52,7 @@ declare -A PHPWRAPPER_MODES=(
) )
projdir= projdir=
install_phpwrappers=auto install_phpwrappers=1
args=( args=(
"Mettre à jour le script runphp" "Mettre à jour le script runphp"
"[path/to/runphp]" "[path/to/runphp]"
@ -63,7 +63,6 @@ Copier les fichiers pour un projet de l'université de la Réunion:
- le script build est mis à jour - le script build est mis à jour
- les wrappers PHP pour la gestion des tâches de fond sont mis à jour le cas - les wrappers PHP pour la gestion des tâches de fond sont mis à jour le cas
échéant" échéant"
-p,--phpwrappers-install install_phpwrappers=1 "forcer l'installation des wrappers PHP"
--np,--no-phpwrappers-install install_phpwrappers= "ne pas installer les wrappers PHP" --np,--no-phpwrappers-install install_phpwrappers= "ne pas installer les wrappers PHP"
) )
parse_args "$@"; set -- "${args[@]}" parse_args "$@"; set -- "${args[@]}"
@ -156,35 +155,31 @@ if [ -n "$projdir" ]; then
' '
fi fi
sbin_path=sbin if [ -z "$install_phpwrappers" ]; then
sbin2proj=.. install_phpwrappers=
cli_path=cli/config elif [ ! -f "$PROJDIR/$COMPOSERDIR/composer.json" ]; then
cli2proj=../.. # ce doit être un projet PHP
if [ "$install_phpwrappers" == auto ]; then install_phpwrappers=
if [ ! -f "$PROJDIR/$COMPOSERDIR/composer.json" ]; then elif [ -d "$projdir/cli/config" ]; then
# ce doit être un projet PHP install_phpwrappers=1
install_phpwrappers= sbin_path=sbin
elif [ -d "$projdir/cli/config" ]; then sbin2proj=..
install_phpwrappers=1 cli_path=cli/config
sbin_path=sbin cli2proj=../..
sbin2proj=.. elif [ -d "$projdir/cli_config" ]; then
cli_path=cli/config install_phpwrappers=1
cli2proj=../.. sbin_path=sbin
elif [ -d "$projdir/cli_config" ]; then sbin2proj=..
install_phpwrappers=1 cli_path=cli_config
sbin_path=sbin cli2proj=..
sbin2proj=.. elif [ -d "$projdir/_cli" ]; then
cli_path=cli_config install_phpwrappers=1
cli2proj=../.. sbin_path=sbin
elif [ -d "$projdir/_cli" ]; then sbin2proj=..
install_phpwrappers=1 cli_path=_cli
sbin_path=sbin cli2proj=..
sbin2proj=.. else
cli_path=_cli install_phpwrappers=
cli2proj=../..
else
install_phpwrappers=
fi
fi fi
if [ -n "$install_phpwrappers" ]; then if [ -n "$install_phpwrappers" ]; then