added file dependency check, switched back to english, smaller fix and improvements
This commit is contained in:
@@ -13,7 +13,7 @@
|
||||
# Upgrade package database
|
||||
pkgupdt()
|
||||
{
|
||||
prnt I "Mise à jour de la liste des paquets..."
|
||||
prnt I "Updating package list..."
|
||||
$PKG_MAN $COM_UPDATE
|
||||
}
|
||||
export -f pkgupdt
|
||||
@@ -23,21 +23,21 @@ export -f pkgupdt
|
||||
# Installation
|
||||
pkginst()
|
||||
{
|
||||
prnt I "Installation de paquets..."
|
||||
prnt I "Installing packages..."
|
||||
if [[ $# -lt 1 ]]; then
|
||||
prnt E "pkginst(): des paramètres sont requis."
|
||||
prnt E "pkginst(): some required parameters are missing."
|
||||
exit 11
|
||||
fi
|
||||
if [[ ! $INSTALL_MODE == dev ]]; then
|
||||
exec_preinst $@
|
||||
# exec_preinst $@
|
||||
$PKG_MAN $COM_INSTALL $@
|
||||
exec_postinst $@
|
||||
# exec_postinst
|
||||
else
|
||||
local pkg=
|
||||
for pkg in $@; do
|
||||
exec_preinst $pkg
|
||||
# exec_preinst $pkg
|
||||
$PKG_MAN $COM_INSTALL $pkg
|
||||
exec_postinst $pkg
|
||||
# exec_postinst
|
||||
done
|
||||
unset pkg
|
||||
fi
|
||||
@@ -49,10 +49,10 @@ export -f pkginst
|
||||
# Upgrade
|
||||
pkgupgd()
|
||||
{
|
||||
prnt I "Application de la mise à jours du système..."
|
||||
exec_preupgd
|
||||
prnt I "Applying system upgrade..."
|
||||
# exec_preupgd
|
||||
$PKG_MAN $COM_UPGRADE
|
||||
exec_postupgd
|
||||
# exec_postupgd
|
||||
}
|
||||
export -f pkgupgd
|
||||
|
||||
@@ -61,21 +61,21 @@ export -f pkgupgd
|
||||
# Uninstallation
|
||||
pkgrm()
|
||||
{
|
||||
prnt I "Désinstallation de paquets..."
|
||||
prnt I "Uninstalling packages..."
|
||||
if [[ $# -lt 1 ]]; then
|
||||
prnt E "pkgrem(): des paramètres sont requis."
|
||||
prnt E "pkgrem(): some required parameters are missing."
|
||||
exit 11
|
||||
fi
|
||||
if [[ ! $INSTALL_MODE == dev ]]; then
|
||||
exec_prerm $@
|
||||
# exec_prerm $@
|
||||
$PKG_MAN $COM_REMOVE $@
|
||||
exec_postrm
|
||||
# exec_postrm
|
||||
else
|
||||
local pkg=
|
||||
for pkg in $@; do
|
||||
exec_prerm $pkg
|
||||
# exec_prerm $pkg
|
||||
$PKG_MAN $COM_REMOVE $pkg
|
||||
exec_postrm
|
||||
# exec_postrm
|
||||
done
|
||||
uset pkg
|
||||
fi
|
||||
@@ -87,10 +87,10 @@ export -f pkgrm
|
||||
# Cleanup
|
||||
pkgautorm()
|
||||
{
|
||||
prnt I "Désinstallation de paquets superflus..."
|
||||
exec_preautorm
|
||||
prnt I "Uninstalling unneeded packages..."
|
||||
# exec_preautorm
|
||||
$PKG_MAN $COM_AUTOREM
|
||||
exec_postautorm
|
||||
# exec_postautorm
|
||||
}
|
||||
export -f pkgautorm
|
||||
|
||||
@@ -104,7 +104,7 @@ exec_preinst()
|
||||
unset $cmd
|
||||
for pkg in $pkglist; do
|
||||
if [[ $(function_exists preinst_$pkg) ]]; then
|
||||
prnt I "Exécution de la préinstallation de $pkg ..."
|
||||
prnt I "Running $pkg preinstallation script..."
|
||||
preinst_$pkg
|
||||
fi
|
||||
done
|
||||
@@ -123,7 +123,7 @@ exec_postinst()
|
||||
fi
|
||||
for pkg in $POSTINSTLIST; do
|
||||
if [[ $(function_exists postinst_$pkg) ]]; then
|
||||
prnt I "Exécution de la postinstallation de $pkg ..."
|
||||
prnt I "Running $pkg postinstallation script..."
|
||||
postinst_$pkg
|
||||
fi
|
||||
done
|
||||
@@ -141,7 +141,7 @@ exec_prerm()
|
||||
unset $cmd
|
||||
for pkg in $pkglist; do
|
||||
if [[ $(function_exists prerm_$pkg) ]]; then
|
||||
prnt I "Exécution du préretrait de $pkg ..."
|
||||
prnt I "Running $pkg preremove script..."
|
||||
prerm_$pkg
|
||||
fi
|
||||
done
|
||||
@@ -160,7 +160,7 @@ exec_postrm()
|
||||
fi
|
||||
for pkg in $POSTRMLIST; do
|
||||
if [[ $(function_exists postrm_$pkg) ]]; then
|
||||
prnt I "Exécution de la postretrait de $pkg ..."
|
||||
prnt I "Running $pkg postremove script..."
|
||||
postrm_$pkg
|
||||
fi
|
||||
done
|
||||
@@ -176,7 +176,7 @@ exec_preupgd()
|
||||
local pkglist=$($GET_UPGRADELIST)
|
||||
for pkg in $pkglist; do
|
||||
if [[ $(function_exists preupgd_$pkg) ]]; then
|
||||
prnt I "Exécution de la pré mise à jour de $pkg ..."
|
||||
prnt I "Running $pkg preupgrade script..."
|
||||
preupgd_$pkg
|
||||
fi
|
||||
done
|
||||
@@ -195,7 +195,7 @@ exec_postupgd()
|
||||
fi
|
||||
for pkg in $POSTUPGDLIST; do
|
||||
if [[ $(function_exists postupgd_$pkg) ]]; then
|
||||
prnt I "Exécution de la post mise à jour de $pkg ..."
|
||||
prnt I "Running $pkg postupgrade script..."
|
||||
postupgd_$pkg
|
||||
fi
|
||||
done
|
||||
@@ -211,7 +211,7 @@ exec_preautorm()
|
||||
local pkglist=$($GET_AUTOREMLIST)
|
||||
for pkg in $pkglist; do
|
||||
if [[ $(function_exists prerm_$pkg) ]]; then
|
||||
prnt I "Exécution du préretrait de $pkg ..."
|
||||
prnt I "Running $pkg preremove script..."
|
||||
prerm_$pkg
|
||||
fi
|
||||
done
|
||||
|
||||
Reference in New Issue
Block a user