mirror of
https://github.com/smxi/inxi.git
synced 2025-01-19 00:47:47 +00:00
New version, new tarball. For some weird reason rpm query didn't work with gawk all
on one line, moved to separate lines. Who knows why? This only impacts rpm distros.
This commit is contained in:
parent
98de82a431
commit
d6ff64d653
53
inxi
53
inxi
|
@ -3,7 +3,7 @@
|
||||||
# openbsd ftp does http
|
# openbsd ftp does http
|
||||||
########################################################################
|
########################################################################
|
||||||
#### Script Name: inxi
|
#### Script Name: inxi
|
||||||
#### Version: 2.2.11
|
#### Version: 2.2.12
|
||||||
#### Date: 2014-09-24
|
#### Date: 2014-09-24
|
||||||
#### Patch Number: 00
|
#### Patch Number: 00
|
||||||
########################################################################
|
########################################################################
|
||||||
|
@ -4819,15 +4819,24 @@ get_de_gtk_data()
|
||||||
# Name : libgtk-3-0
|
# Name : libgtk-3-0
|
||||||
# Version : 3.12.2
|
# Version : 3.12.2
|
||||||
elif type -p rpm &>/dev/null;then
|
elif type -p rpm &>/dev/null;then
|
||||||
toolkit=$( rpm -qi libgtk-3-0 2>/dev/null | gawk -F ':' '/^[[:space:]]*Version/
|
toolkit=$( rpm -qi libgtk-3-0 2>/dev/null | gawk -F ':' '
|
||||||
{ gsub(/^[[:space:]]+|[[:space:]]+$/,"",$2); print $2 }' )
|
/^[[:space:]]*Version/ {
|
||||||
|
gsub(/^[[:space:]]+|[[:space:]]+$/,"",$2)
|
||||||
|
print $2
|
||||||
|
}' )
|
||||||
if [[ -z $toolkit ]];then
|
if [[ -z $toolkit ]];then
|
||||||
toolkit=$( rpm -qi libgtk-4-0 2>/dev/null | gawk -F ':' '/^[[:space:]]*Version/
|
toolkit=$( rpm -qi libgtk-4-0 2>/dev/null | gawk -F ':' '
|
||||||
{gsub(/^[[:space:]]+|[[:space:]]+$/,"",$2);print $2}' )
|
/^[[:space:]]*Version/ {
|
||||||
|
gsub(/^[[:space:]]+|[[:space:]]+$/,"",$2)
|
||||||
|
print $2
|
||||||
|
}' )
|
||||||
fi
|
fi
|
||||||
if [[ -z $toolkit ]];then
|
if [[ -z $toolkit ]];then
|
||||||
toolkit=$( rpm -qi libgtk-2-0 2>/dev/null | gawk -F ':' '/^[[:space:]]*Version/
|
toolkit=$( rpm -qi libgtk-2-0 2>/dev/null | gawk -F ':' '
|
||||||
{gsub(/^[[:space:]]+|[[:space:]]+$/,"",$2);print $2}' )
|
/^[[:space:]]*Version/ {
|
||||||
|
gsub(/^[[:space:]]+|[[:space:]]+$/,"",$2)
|
||||||
|
print $2
|
||||||
|
}' )
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
@ -9279,7 +9288,7 @@ get_repo_data()
|
||||||
do
|
do
|
||||||
repo_data_working="$( gawk -v repoFile="$repo_file" '
|
repo_data_working="$( gawk -v repoFile="$repo_file" '
|
||||||
!/^[[:space:]]*$|^[[:space:]]*#/ {
|
!/^[[:space:]]*$|^[[:space:]]*#/ {
|
||||||
print "apt sources:" repoFile ":" $0
|
print "apt sources^" repoFile "^" $0
|
||||||
}' $repo_file )"
|
}' $repo_file )"
|
||||||
if [[ -n $repo_data_working ]];then
|
if [[ -n $repo_data_working ]];then
|
||||||
if [[ -z $REPO_DATA ]];then
|
if [[ -z $REPO_DATA ]];then
|
||||||
|
@ -9302,11 +9311,11 @@ get_repo_data()
|
||||||
# older redhats put their yum data in /etc/yum.conf
|
# older redhats put their yum data in /etc/yum.conf
|
||||||
repo_files=$( ls $yum_repo_dir*.repo $yum_conf 2>/dev/null )
|
repo_files=$( ls $yum_repo_dir*.repo $yum_conf 2>/dev/null )
|
||||||
repo_name='yum'
|
repo_name='yum'
|
||||||
log_function_data "yum repo filess: $repo_files"
|
log_function_data "yum repo files: $repo_files"
|
||||||
elif [[ -d $zypp_repo_dir ]];then
|
elif [[ -d $zypp_repo_dir ]];then
|
||||||
repo_files=$( ls $zypp_repo_dir*.repo 2>/dev/null )
|
repo_files=$( ls $zypp_repo_dir*.repo 2>/dev/null )
|
||||||
repo_name='zypp'
|
repo_name='zypp'
|
||||||
log_function_data "zypp repo filess: $repo_files"
|
log_function_data "zypp repo files: $repo_files"
|
||||||
fi
|
fi
|
||||||
log_function_data 'cat' "$repo_files"
|
log_function_data 'cat' "$repo_files"
|
||||||
if [[ -n $repo_files ]];then
|
if [[ -n $repo_files ]];then
|
||||||
|
@ -9315,7 +9324,7 @@ get_repo_data()
|
||||||
repo_data_working="$( gawk -v repoFile=$repo_file '
|
repo_data_working="$( gawk -v repoFile=$repo_file '
|
||||||
# construct the string for the print function to work with, file name: data
|
# construct the string for the print function to work with, file name: data
|
||||||
function print_line( fileName, repoId, repoUrl ){
|
function print_line( fileName, repoId, repoUrl ){
|
||||||
print "'$repo_name' sources:" fileName ":" repoId repoUrl
|
print "'$repo_name' sources^" fileName "^" repoId repoUrl
|
||||||
}
|
}
|
||||||
BEGIN {
|
BEGIN {
|
||||||
FS="\n"
|
FS="\n"
|
||||||
|
@ -9406,7 +9415,7 @@ $repo_data_working"
|
||||||
}
|
}
|
||||||
/^[[:space:]]*Server/ {
|
/^[[:space:]]*Server/ {
|
||||||
sub(/^[[:space:]]+|[[:space:]]+$/,"",$2)
|
sub(/^[[:space:]]+|[[:space:]]+$/,"",$2)
|
||||||
print "pacman repo servers:" repoFile ":" $2 "\\n"
|
print "pacman repo servers^" repoFile "^" $2 "\\n"
|
||||||
}
|
}
|
||||||
' $repo_file )"
|
' $repo_file )"
|
||||||
else
|
else
|
||||||
|
@ -9423,7 +9432,7 @@ $repo_data_working"
|
||||||
do
|
do
|
||||||
repo_data_working="$( gawk -v repoFile="$repo_file" '
|
repo_data_working="$( gawk -v repoFile="$repo_file" '
|
||||||
!/^[[:space:]]*$|^[[:space:]]*#/ {
|
!/^[[:space:]]*$|^[[:space:]]*#/ {
|
||||||
print "slackpkg sources:" repoFile ":" $0
|
print "slackpkg sources^" repoFile "^" $0
|
||||||
}' $repo_file )"
|
}' $repo_file )"
|
||||||
if [[ -n $repo_data_working ]];then
|
if [[ -n $repo_data_working ]];then
|
||||||
if [[ -z $REPO_DATA ]];then
|
if [[ -z $REPO_DATA ]];then
|
||||||
|
@ -9458,9 +9467,9 @@ $repo_data_working"
|
||||||
print $0
|
print $0
|
||||||
}' <<< $repo_line )
|
}' <<< $repo_line )
|
||||||
if [[ -n $( grep '://' <<< $repo_line ) ]];then
|
if [[ -n $( grep '://' <<< $repo_line ) ]];then
|
||||||
repo_data_working="$repo_data_working:$repo_line\n"
|
repo_data_working="$repo_data_working^$repo_line\n"
|
||||||
else
|
else
|
||||||
repo_data_working="${repo_data_working}pisi repo:$repo_line"
|
repo_data_working="${repo_data_working}pisi repo^$repo_line"
|
||||||
fi
|
fi
|
||||||
done <<< "$REPO_DATA"
|
done <<< "$REPO_DATA"
|
||||||
# echo and execute the line breaks inserted
|
# echo and execute the line breaks inserted
|
||||||
|
@ -9497,7 +9506,7 @@ $repo_data_working"
|
||||||
repo_data_working2=$( grep -Eo '([^[:space:]]+://|[[:space:]]/).*' <<< $repo_line )
|
repo_data_working2=$( grep -Eo '([^[:space:]]+://|[[:space:]]/).*' <<< $repo_line )
|
||||||
# then get the repo name string by slicing out the url string
|
# then get the repo name string by slicing out the url string
|
||||||
repo_name=$( sed "s|[[:space:]]*$repo_data_working2||" <<< $repo_line )
|
repo_name=$( sed "s|[[:space:]]*$repo_data_working2||" <<< $repo_line )
|
||||||
repo_data_working="${repo_data_working}urpmq repo:$repo_name:$repo_data_working2\n"
|
repo_data_working="${repo_data_working}urpmq repo^$repo_name^$repo_data_working2\n"
|
||||||
fi
|
fi
|
||||||
done <<< "$REPO_DATA"
|
done <<< "$REPO_DATA"
|
||||||
# echo and execute the line breaks inserted
|
# echo and execute the line breaks inserted
|
||||||
|
@ -9509,7 +9518,7 @@ $repo_data_working"
|
||||||
IGNORECASE=1
|
IGNORECASE=1
|
||||||
}
|
}
|
||||||
/^SERVERNAME/ {
|
/^SERVERNAME/ {
|
||||||
print "BSD ports servers:" repoFile ":" $2
|
print "BSD ports servers^" repoFile "^" $2
|
||||||
}
|
}
|
||||||
' $freebsd_conf )"
|
' $freebsd_conf )"
|
||||||
fi
|
fi
|
||||||
|
@ -9542,7 +9551,7 @@ $repo_data_working"
|
||||||
}
|
}
|
||||||
if ( $1 == "enabled" ) {
|
if ( $1 == "enabled" ) {
|
||||||
if ( $2 == "yes" ) {
|
if ( $2 == "yes" ) {
|
||||||
print "BSD ports server:" repoFile ":" repoName " " repoUrl
|
print "BSD ports server^" repoFile "^" repoName " " repoUrl
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -9563,7 +9572,7 @@ $repo_data_working"
|
||||||
IGNORECASE=1
|
IGNORECASE=1
|
||||||
}
|
}
|
||||||
/^installpath/ {
|
/^installpath/ {
|
||||||
print "BSD ports servers:" repoFile ":" $2
|
print "BSD ports servers^" repoFile "^" $2
|
||||||
}
|
}
|
||||||
' $openbsd_conf )"
|
' $openbsd_conf )"
|
||||||
fi
|
fi
|
||||||
|
@ -13333,9 +13342,9 @@ print_repo_data()
|
||||||
while read repo_line
|
while read repo_line
|
||||||
do
|
do
|
||||||
(( repo_count++ ))
|
(( repo_count++ ))
|
||||||
repo_type=$( cut -d ':' -f 1 <<< $repo_line )
|
repo_type=$( cut -d '^' -f 1 <<< $repo_line )
|
||||||
file_name=$( cut -d ':' -f 2 <<< $repo_line )
|
file_name=$( cut -d '^' -f 2 <<< $repo_line )
|
||||||
file_content=$( cut -d ':' -f 3-7 <<< $repo_line )
|
file_content=$( cut -d '^' -f 3-7 <<< $repo_line )
|
||||||
# this will dump unwanted white space line starters. Some irc channels
|
# this will dump unwanted white space line starters. Some irc channels
|
||||||
# use bots that show page title for urls, so need to break the url by adding
|
# use bots that show page title for urls, so need to break the url by adding
|
||||||
# a white space.
|
# a white space.
|
||||||
|
|
|
@ -1,3 +1,16 @@
|
||||||
|
=====================================================================================
|
||||||
|
Version: 2.2.12
|
||||||
|
Patch Version: 00
|
||||||
|
Script Date: 2014-09-24
|
||||||
|
-----------------------------------
|
||||||
|
Changes:
|
||||||
|
-----------------------------------
|
||||||
|
New version, new tarball. For some weird reason rpm query didn't work with gawk all
|
||||||
|
on one line, moved to separate lines. Who knows why? This only impacts rpm distros.
|
||||||
|
|
||||||
|
-----------------------------------
|
||||||
|
-- Harald Hope - Thu, 25 Sep 2014 00:19:06 -0700
|
||||||
|
|
||||||
=====================================================================================
|
=====================================================================================
|
||||||
Version: 2.2.11
|
Version: 2.2.11
|
||||||
Patch Version: 00
|
Patch Version: 00
|
||||||
|
|
Loading…
Reference in a new issue