autoupdater: Use awk instead of grep+head+tail to split manifest
This commit is contained in:
parent
4ca8a35fc9
commit
54620d6231
@ -59,15 +59,11 @@ if test $? -ne 0; then
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
seperator_line=$(cat $manifest|grep -n "^---$"|cut -d: -f1|head -n1)
|
awk "BEGIN { sep=0 }
|
||||||
|
/^---\$/ { sep=1; next }
|
||||||
if test -z "$seperator_line"; then
|
{ if(sep==0) print > \"$manifest_upper\";
|
||||||
echo "Couldn't find --- marker!" >&2
|
else print > \"$manifest_lower\"}" \
|
||||||
exit 1
|
$manifest
|
||||||
fi
|
|
||||||
|
|
||||||
head -n$(($seperator_line-1)) $manifest > $manifest_upper
|
|
||||||
tail -n+$(($seperator_line+1)) $manifest > $manifest_lower
|
|
||||||
|
|
||||||
signatures=""
|
signatures=""
|
||||||
while read sig; do
|
while read sig; do
|
||||||
|
Loading…
Reference in New Issue
Block a user