From e458606ad2fce01e973eb02fb44f0a3f27baafa9 Mon Sep 17 00:00:00 2001 From: Allan McRae Date: Fri, 8 Jul 2011 21:14:53 +1000 Subject: pacman-key: rename --trust to --edit-key MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This keeps the naming of the option more consistent with what is actually being called by gpg. Original-patch-by: Denis A. AltoƩ Falqueto Signed-off-by: Allan McRae --- scripts/pacman-key.sh.in | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'scripts') diff --git a/scripts/pacman-key.sh.in b/scripts/pacman-key.sh.in index 473f87fc..161281f4 100644 --- a/scripts/pacman-key.sh.in +++ b/scripts/pacman-key.sh.in @@ -29,12 +29,12 @@ myver="@PACKAGE_VERSION@" # Options ADD=0 DELETE=0 +EDITKEY=0 EXPORT=0 FINGER=0 LIST=0 RECEIVE=0 RELOAD=0 -TRUST=0 UPDATEDB=0 m4_include(library/output_format.sh) @@ -56,11 +56,11 @@ usage() { echo "$(gettext " -h, --help Show this help message and exit")" echo "$(gettext " -l, --list List keys")" echo "$(gettext " -r, --receive Fetch the specified keyids")" - echo "$(gettext " -t, --trust Set the trust level of the given keyids")" echo "$(gettext " -u, --updatedb Update the trustdb of pacman")" echo "$(gettext " -V, --version Show program version")" echo "$(gettext " --config Use an alternate config file")" printf "$(gettext " (instead of '%s')")\n" "@sysconfdir@/pacman.conf" + echo "$(gettext " --edit-key Present a menu for key management task on keyids")" echo "$(gettext " --gpgdir Set an alternate directory for gnupg")" printf "$(gettext " (instead of '%s')")\n" "@sysconfdir@/pacman.d/gnupg" echo "$(gettext " --reload Reload the default keys")" @@ -209,9 +209,9 @@ if ! type gettext &>/dev/null; then } fi -OPT_SHORT="a::d:e:f::hlr:t:uV" -OPT_LONG="add::,config:,delete:,export::,finger::,gpgdir:,help,list" -OPT_LONG+=",receive:,reload,trust:,updatedb,version" +OPT_SHORT="a::d:e:f::hlr:uV" +OPT_LONG="add::,config:,delete:,edit-key:,export::,finger::,gpgdir:" +OPT_LONG+=",help,list,receive:,reload,updatedb,version" if ! OPT_TEMP="$(parse_options $OPT_SHORT $OPT_LONG "$@")"; then echo; usage; exit 1 # E_INVALID_OPTION; fi @@ -228,13 +228,13 @@ while true; do -a|--add) ADD=1; [[ -n $2 && ${2:0:1} != "-" ]] && shift && KEYFILES=($1) ;; --config) shift; CONFIG=$1 ;; -d|--delete) DELETE=1; shift; KEYIDS=($1) ;; + --edit-key) EDITKEY=1; shift; KEYIDS=($1) ;; -e|--export) EXPORT=1; [[ -n $2 && ${2:0:1} != "-" ]] && shift && KEYIDS=($1) ;; -f|--finger) FINGER=1; [[ -n $2 && ${2:0:1} != "-" ]] && shift && KEYIDS=($1) ;; --gpgdir) shift; PACMAN_KEYRING_DIR=$1 ;; -l|--list) LIST=1 ;; -r|--receive) RECEIVE=1; shift; KEYSERVER="${1[0]}"; KEYIDS=("${1[@]:1}") ;; --reload) RELOAD=1 ;; - -t|--trust) TRUST=1; shift; KEYIDS=($1) ;; -u|--updatedb) UPDATEDB=1 ;; -h|--help) usage; exit 0 ;; @@ -252,7 +252,7 @@ if ! type -p gpg >/dev/null; then exit 1 fi -if (( (ADD || DELETE || RECEIVE || RELOAD || TRUST || UPDATEDB) && EUID != 0 )); then +if (( (ADD || DELETE || EDITKEY || RECEIVE || RELOAD || UPDATEDB) && EUID != 0 )); then error "$(gettext "%s needs to be run as root for this operation.")" "pacman-key" exit 1 fi @@ -293,7 +293,7 @@ if (( RECEIVE )); then ${GPG_PACMAN} --keyserver "$KEYSERVER" --recv-keys "${KEYIDS[@]}" fi -if (( TRUST )); then +if (( EDITKEY )); then for key in ${KEYIDS[@]}; do # Verify if the key exists in pacman's keyring if ${GPG_PACMAN} --list-keys "$key" > /dev/null 2>&1; then -- cgit v1.2.3-70-g09d2