fix: debian list
This commit is contained in:
parent
47f8ac7629
commit
eb0946cb87
|
@ -1,5 +1,5 @@
|
|||
#!/bin/bash
|
||||
# version: 0.0.15
|
||||
# version: 0.0.16
|
||||
# file: upd
|
||||
# Folder: /usr/local/bin
|
||||
# By echolib
|
||||
|
|
|
@ -21,6 +21,7 @@ upd__prepare_show
|
|||
# Check for updates if debian (apt based)
|
||||
#======================================================================
|
||||
upd__check_deb() {
|
||||
echo
|
||||
upd__sudoroot # Tools: Check if user is admin
|
||||
|
||||
sudo apt-get update -qq
|
||||
|
@ -30,13 +31,17 @@ sudo apt list --upgradable -a 2>/dev/null \
|
|||
| grep "now" \
|
||||
> "$upd_file_tmp_apt"
|
||||
|
||||
|
||||
# Converting datas
|
||||
[[ -f "$upd_file_check" ]] \
|
||||
&& rm -f "$upd_file_check"
|
||||
touch "$upd_file_check"
|
||||
while read -r "pkg" "old" "new"
|
||||
do
|
||||
pkg=`echo $pkg | awk -F"/" '{print $1}'`
|
||||
new=`echo $new | awk '{print $NF}'`
|
||||
pkg=`echo "$pkg" | awk -F'/' '{print $1}'`
|
||||
new=`echo "$new" | awk '{print $NF}'`
|
||||
new=${new/]/}
|
||||
echo "$pkg $old -> $new" > "$upd_file_check"
|
||||
echo "$pkg $old -> $new" >> "$upd_file_check"
|
||||
done < <( cat "$upd_file_tmp_apt")
|
||||
rm -f "$upd_file_tmp_apt"
|
||||
|
||||
|
|
Loading…
Reference in New Issue