getInfo 2.38.4

This commit is contained in:
kyodev 2017-11-18 22:36:30 +01:00
parent 8e1f9594e4
commit c5a8ae0961
2 changed files with 9 additions and 13 deletions

View File

@ -1,6 +1,6 @@
#!/bin/bash
version=2.38.3
version=2.38.4
date="18/11/2017"
projet="simpledeb"
contact="IRC freenode ##sdeb ou https://framagit.org/kyodev/kyopages/issues/"
@ -1355,27 +1355,23 @@ fi_pkg_apt(){ #v3 18/11/2017 qte comment cmd
[ "${qte_upgradable[0]}" -eq 0 ] && comment_upgrade=${comment_upgrade/0 /aucun }
cmd_upgrade="apt list --upgradable"
if [ "${qte_upgradable[0]}" -gt 0 ]; then
upgrade=$( grep '^Inst' <<< "$stock_upgd" )
upgrade=$( sort <<< $upgrade )
upgrade=$( gawk '/Inst /{
sub(/\(/,"",$4); sub(/\/.*/,"",$5); sub(/\[/,"",$3); sub(/\]/,"",$3);
printf "%-25s source: %-25s %-20s ⇉ %-20s\n",$2,$5,$3,$4 }' <<< $upgrade )
alert_upgrade="les paquets peuvent être mis à jour avec avec: \n"
upgrade=$( grep '^Inst' <<< "$stock_upgd" | sort | gawk '{
sub(/\(/,"",$4); sub(/\/.*/,"",$5); sub(/\[/,"",$3); sub(/\]/,"",$3);
printf "%-25s source: %-25s %-20s ⇉ %-20s\n",$2,$5,$3,$4 }')
alert_upgrade="les paquets peuvent être mis à jour avec: \n"
alert_upgrade+='`apt upgrade` '
fi
# full-upgrade
if [ "${qte_upgradable[1]}" -gt 0 ]; then
notUpgraded=${stock_upgd%The following packages wil be upgraded*} # suppression fin
notUpgraded=${stock_upgd%The following packages will be upgraded*} # suppression fin
notUpgraded=${notUpgraded#*The following packages have been kept back:} # suppression début
notUpgraded=$( sed '/newly/d' <<< "$notUpgraded" ) # suppression ligne état
notUpgraded=$( sort <<< $notUpgraded )
notUpgraded=$( tr '\n' ' ' <<< $notUpgraded ) # remplacement newline
notUpgraded=$( sed '/newly/d' <<< "$notUpgraded" | sort | tr '\n' ' ' )
notUpgraded=${notUpgraded// / } # suppression espace double
[ "${qte_upgradable[1]}" -gt 1 ] && pluriel="s" || unset pluriel
comment_notUpgraded="${qte_upgradable[1]} paquet"$pluriel" nécessitant une mise à jour profonde)"
cmd_notUpgraded="apt list --upgradable"
alert_full_upgrade="les paquets peuvent être mis à jour avec avec: \n"
alert_full_upgrade+='`apt full-upgrade` '
alert_full_upgrade+='`apt full-upgrade`'
fi
printf "◇"
# autoremove

View File

@ -4,7 +4,7 @@
* ! f__requis, fscript_install, f__scandir
## 2.38.3 18/11/2017
## 2.38.4 18/11/2017
* nouveau: fi_pkg_apt, test clean, autoclean, préférences apt
* nouveau: fi_journal, alerte firmware bug (microcode)