code cleanup, new tarball, added test to add repo line

This commit is contained in:
inxi-svn 2014-09-24 20:29:42 +00:00
parent 1f06a5a6f5
commit 0c8f2108dd

5
inxi
View file

@ -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 )"