live
  5   ˆl–äY>”Ên-ji@¿pB¸ÈÅ£�þD	YÁ	Çã„óïùÆƒy 9ÅÃÂ  Ö    #!/bin/bash

# who-uploads sourcepkg [ sourcepkg ... ]
# Tells you who made the latest uploads of a source package.
# NB: I'm encoded in UTF-8!!

# Written and copyright 2006 by Julian Gilbey <jdg@debian.org>
# Based on an original script
# copyright 2006 Adeodato SimÃ³ <dato@net.com.org.es>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.

set -e

PROGNAME=${0##*/}
MODIFIED_CONF_MSG='Default settings modified by devscripts configuration files:'

usage() {
    echo \
"Usage: $PROGNAME [options] package ...
  Display the most recent three uploaders of each package.
  Packages should be source packages, not binary packages.

  Options:
    -M, --max-uploads=N
                      Display at most the N most recent uploads (default: 3)
    --keyring KEYRING Add KEYRING as a GPG keyring for Debian Developers'
                      keys in addition to /usr/share/keyrings/debian-keyring.*,
                      /usr/share/keyrings/debian-maintainers.gpg and
                      /usr/share/keyrings/debian-nonupload.gpg;
                      this option may be given multiple times
    --no-default-keyrings
                      Do not use the default keyrings
    --no-conf, --noconf
                      Don't read devscripts config files;
                      must be the first option given
    --date            Display the date of the upload
    --no-date, --nodate
                      Don't display the date of the upload (default)
    --help            Show this message
    --version         Show version and copyright information

$MODIFIED_CONF_MSG"
}

version() {
    echo \
"This is $PROGNAME, from the Debian devscripts package, version 2.23.4+deb12u2
This code is copyright 2006 by Julian Gilbey <jdg@debian.org>,
all rights reserved.
Based on original code copyright 2006 Adeodato SimÃ³ <dato@net.com.org.es>
This program comes with ABSOLUTELY NO WARRANTY.
You are free to redistribute this code under the terms of the
GNU General Public License, version 2 or later."
}


# Boilerplate: set config variables
DEFAULT_WHOUPLOADS_KEYRINGS=/usr/share/keyrings/debian-keyring.gpg:/usr/share/keyrings/debian-maintainers.gpg:/usr/share/keyrings/debian-nonupload.gpg
DEFAULT_WHOUPLOADS_MAXUPLOADS=3
DEFAULT_WHOUPLOADS_DATE=no
VARS="WHOUPLOADS_KEYRINGS WHOUPLOADS_MAXUPLOADS WHOUPLOADS_DATE"

GPG=gpg
if ! command -v $GPG > /dev/null; then
    echo "$GPG missing"
    GPG=gpg2
    if  ! command -v $GPG > /dev/null; then
	echo "$GPG missing"
	exit 1
    fi
fi

if [ "$1" = "--no-conf" -o "$1" = "--noconf" ]; then
    shift
    MODIFIED_CONF_MSG="$MODIFIED_CONF_MSG
  (no configuration files read)"

    # set defaults
    for var in $VARS; do
	eval "$var=\$DEFAULT_$var"
    done
else
    # Run in a subshell for protection against accidental errors
    # in the config files
    eval $(
	set +e
	for var in $VARS; do
	    eval "$var=\$DEFAULT_$var"
	done

	for file in /etc/devscripts.conf ~/.devscripts
	  do
	  [ -r $file ] && . $file
	done

	set | grep "^WHOUPLOADS_")

    # check sanity
    if [ "$WHOUPLOADS_MAXUPLOADS" != \
	    "$(echo \"$WHOUPLOADS_MAXUPLOADS\" | tr -cd 0-9)" ]; then
	WHOUPLOADS_MAXUPLOADS=3
    fi

    WHOUPLOADS_DATE="$(echo "$WHOUPLOADS_DATE" | tr A-Z a-z)"
    if [ "$WHOUPLOADS_DATE" != "yes" ] && [ "$WHOUPLOADS_DATE" != "no" ]; then
	WHOUPLOADS_DATE=no
    fi

    # don't check WHOUPLOADS_KEYRINGS here

    # set config message
    MODIFIED_CONF=''
    for var in $VARS; do