]>
git.saurik.com Git - apt.git/blob - vendor/getinfo
2 # small helper to extract information form *.ent files
4 BASEDIR
="$(readlink -f "$(dirname $0)")"
5 INFO="$(readlink -f "${BASEDIR}/current/apt-vendor.ent")"
6 VERBATIM="${BASEDIR}/..
/doc
/apt
-verbatim.ent
"
8 if [ -z "$INFO" ] || [ ! -e "$INFO" ]; then
9 echo >&2 'The current vendor is not valid or not chosen by the buildsystem yet.'
14 awk "/<!ENTITY
$1/ {f
=NR
} f
&& NR
-1==f
{ print
; exit 0 }" RS='"' "${2:-$INFO}"
18 local FIELD="$(getrawfield "$@")"
24 debian-stable-codename|debian-oldstable-codename|debian-testing-codename|ubuntu-codename)
25 getrawfield "$1" "$VERBATIM"
27 keyring-package|keyring-filename|keyring-master-filename|keyring-removed-filename|keyring-uri|current-codename)
34 getfield "$2" "$VERBATIM"
37 echo >&2 "Unknown data field $1 requested"