autoupdater: Use awk instead of grep+head+tail to split manifest

This commit is contained in:
Jan-Philipp Litza 2014-01-11 12:39:10 +01:00
parent f9ea8e6862
commit ec5b2adbf1
1 changed files with 1 additions and 5 deletions

View File

@ -71,11 +71,7 @@ manifest_lower=$(mktemp)
wget -O$manifest "$BASE"/manifest || fail "Couldn't fetch manifest"
seperator_line=$(cat $manifest|grep -n "^---$"|cut -d: -f1|head -n1) || \
fail "Could't find --- marker!"
head -n$(($seperator_line-1)) $manifest > $manifest_upper
tail -n+$(($seperator_line+1)) $manifest > $manifest_lower
awk 'BEGIN { sep=0 } /^---$/ { sep=1; next } { if(sep==0) print; else print > "'$manifest_lower'" }' $manifest > $manifest_upper
signatures=""
while read sig; do