]> git.saurik.com Git - apt.git/blobdiff - vendor/getinfo
use proper warning for automatic pipeline disable
[apt.git] / vendor / getinfo
index 415ede98c179f768ee08fd6a9e71abf05c96fbdd..79da83620f1f7af93720a74a93cf19588a2f048f 100755 (executable)
@@ -11,7 +11,7 @@ if [ -z "$INFO" ] || [ ! -e "$INFO" ]; then
 fi
 
 getrawfield() {
-       grep --max-count=1 "^<!ENTITY $1 \"" "${2:-$INFO}" | cut -d'"' -f 2
+       awk "/<!ENTITY $1/ {f=NR} f && NR-1==f { print; exit 0 }" RS='"' "${2:-$INFO}"
 }
 
 getfield() {