mirror of
https://github.com/smxi/inxi.git
synced 2024-11-16 16:21:39 +00:00
code cleanup, new tarball, added test to add repo line
This commit is contained in:
parent
1f06a5a6f5
commit
0c8f2108dd
5
inxi
5
inxi
|
@ -9274,17 +9274,18 @@ get_repo_data()
|
|||
if [[ -f $apt_file || -d $apt_file.d ]];then
|
||||
for repo_file in $apt_file $( ls $apt_file.d/*.list 2>/dev/null)
|
||||
do
|
||||
|
||||
repo_data_working="$( gawk -v repoFile="$repo_file" '
|
||||
!/^[[:space:]]*$|^[[:space:]]*#/ {
|
||||
print "apt sources:" repoFile ":" $0
|
||||
}' $repo_file )"
|
||||
if [[ -n $repo_data_working ]];then
|
||||
if [[ -z $REPO_DATA ]];then
|
||||
REPO_DATA="$repo_data_working"
|
||||
else
|
||||
REPO_DATA="$REPO_DATA
|
||||
$repo_data_working"
|
||||
fi
|
||||
fi
|
||||
done
|
||||
fi
|
||||
# yum - fedora, redhat, centos, etc. Note that rpmforge also may create apt sources
|
||||
|
@ -9419,12 +9420,14 @@ $repo_data_working"
|
|||
!/^[[:space:]]*$|^[[:space:]]*#/ {
|
||||
print "slackpkg sources:" repoFile ":" $0
|
||||
}' $repo_file )"
|
||||
if [[ -n $repo_data_working ]];then
|
||||
if [[ -z $REPO_DATA ]];then
|
||||
REPO_DATA="$repo_data_working"
|
||||
else
|
||||
REPO_DATA="$REPO_DATA
|
||||
$repo_data_working"
|
||||
fi
|
||||
fi
|
||||
done
|
||||
elif [[ -d $pisi_dir && -n $( type -p pisi ) ]];then
|
||||
REPO_DATA="$( pisi list-repo )"
|
||||
|
|
Loading…
Reference in a new issue