From 9a7649e8b268d4baf545f89fda4d0ceb02434b41 Mon Sep 17 00:00:00 2001 From: kyodev Date: Fri, 15 Dec 2017 10:08:22 +0100 Subject: [PATCH] getInfo 2.66.4 --- scripts/getInfo | 43 +++++++++++++++++++++++++++++++----- scripts/getInfo_changelog.md | 3 ++- 2 files changed, 40 insertions(+), 6 deletions(-) diff --git a/scripts/getInfo b/scripts/getInfo index 6c8eb13..f0237e0 100755 --- a/scripts/getInfo +++ b/scripts/getInfo @@ -1,6 +1,6 @@ #!/bin/bash -version=2.66.3 +version=2.66.4 date="15/12/2017" projet="simpledeb" contact="IRC freenode ##sdeb ou https://framagit.org/kyodev/kyopages/issues/" @@ -525,14 +525,14 @@ toDisplay=( # "[ \"$1\" != \"notitre\" ]" ou "[ $1 != notitre ]" (attention au manque de ") # flush (f_prnt flush) inutile si f_d(x) final # $1 type, $2 texte, [$3] test /!\ assigne la variable parent $text -f_prnt(){ # 11/12/2017 +f_prnt(){ # 15/12/2017 local preline='' line='' endline=" \n" - [[ "$1" =~ titre ]] && preline="\n\n" + [[ "$1" =~ tit ]] && preline="\n\n" [[ "$1" == 'tit1' ]] && preline+="# " [[ "$1" == 'tit2' ]] && preline+="## " [[ "$1" == 'tit3' ]] && preline+="### " - [[ "$1" =~ titre ]] && endline+="\n" + [[ "$1" =~ tit ]] && endline+="\n" [[ "$1" == '1' ]] && line="$( sed -E 's/(.*)/* \1 /' <<<$2 )" [[ "$1" == '2' ]] && line="$( sed -E 's/(.*)/ * \1 /' <<<$2 )" [[ "$1" == '3' ]] && line="$( sed -E 's/(.*)/ * \1 /' <<<$2 )" @@ -868,7 +868,7 @@ fi_disk(){ # 14/12/2017 ### f_prnt tit2 "disque"$pluriel # espace des partitions fixes montées - f_prnt 1 "$(gawk -F': ' '{print $1": **"$2"**"}' <<< $fg_disk_part_fix_tot)" + f_prnt 1 "$(gawk -F ': ' '{print $1": **"$2"**"}' <<< $fg_disk_part_fix_tot)" f_prnt f_prnt code # disques fixes et amovibles @@ -2405,9 +2405,42 @@ fi_usb(){ # 15/12/2017 done ls_p=${ls_p%[[:cntrl:]]} IFS="$IFS_INI" + # recherche + detectBluetooth=$( gawk -F ': |⇉ ' ' BEGIN { IGNORECASE=1 } + $5 ~ /Wireless/ && $3 ~ /bluetooth/ { + sub(/[[:blank:]]*Driver/,"",$5); printf "%s %-8s %s\n", $3, $5, $6 + } + ' <<< $ls_p ) + detectWifi=$( gawk -F ': |⇉ ' ' BEGIN { IGNORECASE=1 } + $5 ~ /Wireless/ && $3 ~ /wireless|network/ { + sub(/[[:blank:]]*Driver/,"",$5); printf "%s %-8s %s\n", $3, $5, $6 + } + ' <<< $ls_p ) + detectWebcam=$( gawk -F ': |⇉ ' ' BEGIN { IGNORECASE=1 } + $5 ~ /video/ || $6 ~ /uvcvideo/ { + sub(/[[:blank:]]*Driver/,"",$5); printf "%s %-8s %s\n", $3, $5, $6 + } + ' <<< $ls_p ) + # essai + qBluetooth=$( gawk -F ': |⇉ ' ' BEGIN { IGNORECASE=1 } + $5 ~ /Wireless/ || $3 ~ /bluetooth/ { + sub(/[[:blank:]]*Driver/,"",$5); printf "%s %-8s %s\n", $3, $5, $6 + } + ' <<< $ls_p ) + [ "$detectBluetooth" == "$qBluetooth" ] && unset qBluetooth + qWifi=$( gawk -F ': |⇉ ' ' BEGIN { IGNORECASE=1 } + $5 ~ /Wireless/ || $3 ~ /wireless|network/ { + sub(/[[:blank:]]*Driver/,"",$5); printf "%s %-8s %s\n", $3, $5, $6 + } + ' <<< $ls_p ) + [ "$detectWifi" == "$qWifi" ] && unset qWifi ### f_prnt tit2 "USB" f_dspl cmd "$ls_p" "lsusb" "affichage modifié, ajout Class & Driver" +# f_dspl var "$detectBluetooth" "" "périphérique Bluetooth" +# f_dspl var "$detectWifi" "" "périphérique Wifi" +# f_dspl var "$detectWebcam" "" "périphérique Webcam" +# f_dspl var "$qWifi" "" "suspicion périphérique Wifi" } fi_vrms(){ # 1/12/2017 diff --git a/scripts/getInfo_changelog.md b/scripts/getInfo_changelog.md index c233cbf..d49c38d 100644 --- a/scripts/getInfo_changelog.md +++ b/scripts/getInfo_changelog.md @@ -2,9 +2,10 @@ f__architecture -## getInfo 2.66.3 15/12/2017 +## getInfo 2.66.4 15/12/2017 * révision: fi_usb, présentation pour parsage ultérieur facile +* fix: mise en page, f_prt ## getInfo 2.66.2 14/12/2017