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

25
inxi
View file

@ -9274,16 +9274,17 @@ get_repo_data()
if [[ -f $apt_file || -d $apt_file.d ]];then if [[ -f $apt_file || -d $apt_file.d ]];then
for repo_file in $apt_file $( ls $apt_file.d/*.list 2>/dev/null) for repo_file in $apt_file $( ls $apt_file.d/*.list 2>/dev/null)
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 [[ -z $REPO_DATA ]];then if [[ -n $repo_data_working ]];then
REPO_DATA="$repo_data_working" if [[ -z $REPO_DATA ]];then
else REPO_DATA="$repo_data_working"
REPO_DATA="$REPO_DATA else
$repo_data_working" REPO_DATA="$REPO_DATA
$repo_data_working"
fi
fi fi
done done
fi fi
@ -9419,11 +9420,13 @@ $repo_data_working"
!/^[[:space:]]*$|^[[:space:]]*#/ { !/^[[:space:]]*$|^[[:space:]]*#/ {
print "slackpkg sources:" repoFile ":" $0 print "slackpkg sources:" repoFile ":" $0
}' $repo_file )" }' $repo_file )"
if [[ -z $REPO_DATA ]];then if [[ -n $repo_data_working ]];then
REPO_DATA="$repo_data_working" if [[ -z $REPO_DATA ]];then
else REPO_DATA="$repo_data_working"
REPO_DATA="$REPO_DATA else
$repo_data_working" REPO_DATA="$REPO_DATA
$repo_data_working"
fi
fi fi
done done
elif [[ -d $pisi_dir && -n $( type -p pisi ) ]];then elif [[ -d $pisi_dir && -n $( type -p pisi ) ]];then