X-Git-Url: https://git.saurik.com/apt.git/blobdiff_plain/c43b8efce3f485b9ddafdc1f37e5b988151dd62f..efcbb0f0c0ec92d6b61c6349a5ad69952939272e:/vendor/getinfo?ds=inline diff --git a/vendor/getinfo b/vendor/getinfo index 861fd3d17..d45c0fca2 100755 --- a/vendor/getinfo +++ b/vendor/getinfo @@ -3,6 +3,7 @@ BASEDIR="$(readlink -f "$(dirname $0)")" INFO="$(readlink -f "${BASEDIR}/current/apt-vendor.ent")" +VERBATIM="${BASEDIR}/../doc/apt-verbatim.ent" if [ -z "$INFO" ] || [ ! -e "$INFO" ]; then echo >&2 'The current vendor is not valid or not chosen by the buildsystem yet.' @@ -20,14 +21,20 @@ getfield() { } case "$1" in -debian-stable-codename) - getrawfield 'stable-codename' "${BASEDIR}/../doc/apt-verbatim.ent" +debian-stable-codename|debian-oldstable-codename|debian-testing-codename) + getrawfield "${1#*-}" "$VERBATIM" ;; ubuntu-codename) - getrawfield 'ubuntu-codename' "${BASEDIR}/../doc/apt-verbatim.ent" + getrawfield "$1" "$VERBATIM" ;; -keyring-package|keyring-filename|keyring-master-filename|keyring-removed-filename|keyring-uri|current-distro-codename) - getfield "$1" +keyring-package|keyring-filename|keyring-master-filename|keyring-removed-filename|keyring-uri|current-codename) + exec $0 'vendor' "$@" + ;; +vendor) + getfield "$2" + ;; +verbatim) + getfield "$2" "$VERBATIM" ;; *) echo >&2 "Unknown data field $1 requested"