mirror of
https://github.com/smxi/inxi.git
synced 2025-01-19 00:47:47 +00:00
branch one, testing repo
This commit is contained in:
parent
b319312fae
commit
67f1b44ff2
34
inxi
34
inxi
|
@ -3,9 +3,9 @@
|
||||||
# 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: 01-b1
|
#### Patch Number: 02-b1
|
||||||
########################################################################
|
########################################################################
|
||||||
#### SPECIAL THANKS
|
#### SPECIAL THANKS
|
||||||
########################################################################
|
########################################################################
|
||||||
|
@ -9288,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
|
||||||
|
@ -9311,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
|
||||||
|
@ -9324,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"
|
||||||
|
@ -9415,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
|
||||||
|
@ -9432,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
|
||||||
|
@ -9467,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
|
||||||
|
@ -9506,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
|
||||||
|
@ -9518,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
|
||||||
|
@ -9551,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
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -9572,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
|
||||||
|
@ -13342,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.
|
||||||
|
|
Loading…
Reference in a new issue