Compare commits

..

No commits in common. "7e89fa354fa7ca9989523a7a1d02e9fbf21f9907" and "c9b51998a4d8adc9af58ec04a26f0b8639dfc7b5" have entirely different histories.

2 changed files with 14 additions and 37 deletions

View file

@ -20,16 +20,12 @@ UBUNTU_VERSION=$(lsb_release -rs)
DEBIAN_VERSION=$(lsb_release -cs)
OS=$(lsb_release -si)
if [[ "${OS}" == "Ubuntu" ]]; then
if [ "20.04" == "${UBUNTU_VERSION}" ]; then
if [ "25.10" == "${UBUNTU_VERSION}" ] || [ "25.04" == "${UBUNTU_VERSION}" ] || [ "24.04" == "${UBUNTU_VERSION}" ] || [ "24.10" == "${UBUNTU_VERSION}" ] || [ "23.10" == "${UBUNTU_VERSION}" ] || [ "23.04" == "${UBUNTU_VERSION}" ] || [ "22.10" == "${UBUNTU_VERSION}" ] || [ "22.04" == "${UBUNTU_VERSION}" ]; then
WKHTMLTOX_X64=https://github.com/wkhtmltopdf/packaging/releases/download/0.12.6.1-3/wkhtmltox_0.12.6.1-3.jammy_amd64.deb
elif [ "20.04" == "${UBUNTU_VERSION}" ]; then
WKHTMLTOX_X64=https://github.com/wkhtmltopdf/packaging/releases/download/0.12.6-1/wkhtmltox_0.12.6-1.focal_amd64.deb
elif [ "18.04" == "${UBUNTU_VERSION}" ]; then
WKHTMLTOX_X64=https://github.com/wkhtmltopdf/packaging/releases/download/0.12.6-1/wkhtmltox_0.12.6-1.bionic_amd64.deb
else
# 22.04+ (jusqu'à 26.04 et au-delà) : wkhtmltopdf ne publie pas de build
# par version ; le .deb « jammy » est le plus récent et fonctionne. Un
# « else » (au lieu d'énumérer les versions) évite une URL VIDE sur une
# version récente (26.04) -> gdebi appelé sans fichier -> échec.
WKHTMLTOX_X64=https://github.com/wkhtmltopdf/packaging/releases/download/0.12.6.1-3/wkhtmltox_0.12.6.1-3.jammy_amd64.deb
fi
elif [[ "${OS}" == "Linuxmint" ]]; then
if [ "22.3" == "${UBUNTU_VERSION}" ]; then
@ -209,21 +205,15 @@ elif [ ${EL_INSTALL_WKHTMLTOPDF} = "True" ]; then
if [ "" == "${INSTALLED}" ]; then
echo -e "\n---- Install wkhtml and place shortcuts on correct place ----"
_url=${WKHTMLTOX_X64}
if [ -z "${_url}" ]; then
# Aucune URL (version non mappée) : wkhtmltopdf est OPTIONNEL, on saute
# proprement plutôt que d'appeler gdebi sans fichier (« Usage: gdebi »).
echo "wkhtmltopdf : aucune URL pour cette version, ignoré (optionnel)."
else
sudo wget ${_url}
sudo gdebi --n $(basename ${_url})
retVal=$?
if [[ $retVal -ne 0 ]]; then
echo "gdebi install wkhtmltopdf installation error."
exit 1
fi
sudo ln -fs /usr/local/bin/wkhtmltopdf /usr/bin
sudo ln -fs /usr/local/bin/wkhtmltoimage /usr/bin
sudo wget ${_url}
sudo gdebi --n $(basename ${_url})
retVal=$?
if [[ $retVal -ne 0 ]]; then
echo "gdebi install wkhtmltopdf installation error."
exit 1
fi
sudo ln -fs /usr/local/bin/wkhtmltopdf /usr/bin
sudo ln -fs /usr/local/bin/wkhtmltoimage /usr/bin
else
echo -e "\n---- Already installed wkhtml ----"
fi

View file

@ -709,11 +709,6 @@ def main():
update.validate_version()
_logger.info("Validate environment")
# exit_code : propagé à sys.exit() -> une install qui ÉCHOUE renvoie un
# code non nul (avant, main() ne sortait jamais en erreur : le suivi
# d'installation affichait ✅ même quand poetry/pyenv plantaient).
# Rappel os.system : 0 = succès ; toute autre valeur = échec.
exit_code = 0
status = 0
if (
update.config.install_dev
@ -723,22 +718,16 @@ def main():
status = update.validate_environment()
if update.config.install:
status = update.install_system()
if status not in (0, True, None):
exit_code = 1
if (
update.config.force_install
or update.config.install_dev
or update.config.partial_install
or update.config.is_in_switch
) and not status:
rc = update.update_environment()
if rc not in (0, True, None):
exit_code = 1
update.update_environment()
update.print_log()
# Étapes post-install : uniquement si l'installation a RÉUSSI (sinon
# .venv.erplibre est absent -> cascade d'erreurs inutiles).
if update.config.install_dev and exit_code == 0:
if update.config.install_dev:
# Update pycharm configuration
update.pycharm_update()
@ -747,8 +736,6 @@ def main():
"./.venv.erplibre/bin/python ./script/git/git_repo_update_group.py"
)
os.system("./script/generate_config.sh")
return exit_code
# TODO ignore this if installation fail
# TODO this cause an error at first execution, need to source ./.venv.erplibre/bin/activate and rerun
@ -769,4 +756,4 @@ def die(cond, message, code=1):
if __name__ == "__main__":
sys.exit(main() or 0)
main()