提交 03315e95 authored 作者: Mike Jerris's avatar Mike Jerris

FS-10881: Debian sources parsing support for args

上级 dfe2ebb0
...@@ -255,12 +255,13 @@ EOF ...@@ -255,12 +255,13 @@ EOF
get_sources () { get_sources () {
local tgt_distro="$1" local tgt_distro="$1"
while read type path distro components; do while read type args path distro components; do
test "$type" = deb || continue test "$type" = deb || continue
if echo "$args" | grep -qv "\[" ; then components=$distro;distro=$path;path=$args;args=""; fi
prefix=`echo $distro | awk -F/ '{print $1}'` prefix=`echo $distro | awk -F/ '{print $1}'`
suffix="`echo $distro | awk -F/ '{print $2}'`" suffix="`echo $distro | awk -F/ '{print $2}'`"
if test -n "$suffix" ; then full="$tgt_distro/$suffix" ; else full="$tgt_distro" ; fi if test -n "$suffix" ; then full="$tgt_distro/$suffix" ; else full="$tgt_distro" ; fi
printf "$type $path $full $components\n" printf "$type $args $path $full $components\n"
done < "$2" done < "$2"
} }
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论