diff options
author | Allan McRae <allan@archlinux.org> | 2011-07-08 13:14:53 +0200 |
---|---|---|
committer | Allan McRae <allan@archlinux.org> | 2011-07-19 02:27:53 +0200 |
commit | e458606ad2fce01e973eb02fb44f0a3f27baafa9 (patch) | |
tree | 54f3a30ec6a6ee6a342ff6a45cedb800ac4489f9 | |
parent | 15ca6dca5c7be3253f650d615756f3bff1149d35 (diff) | |
download | pacman-e458606ad2fce01e973eb02fb44f0a3f27baafa9.tar.gz pacman-e458606ad2fce01e973eb02fb44f0a3f27baafa9.tar.xz |
pacman-key: rename --trust to --edit-key
This keeps the naming of the option more consistent with what is
actually being called by gpg.
Original-patch-by: Denis A. AltoƩ Falqueto <denisfalqueto@gmail.com>
Signed-off-by: Allan McRae <allan@archlinux.org>
-rw-r--r-- | scripts/pacman-key.sh.in | 16 |
1 files changed, 8 insertions, 8 deletions
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 <keyserver> <keyid(s)> Fetch the specified keyids")" - echo "$(gettext " -t, --trust <keyid(s)> 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 <file> Use an alternate config file")" printf "$(gettext " (instead of '%s')")\n" "@sysconfdir@/pacman.conf" + echo "$(gettext " --edit-key <keyid(s)> Present a menu for key management task on keyids")" echo "$(gettext " --gpgdir <dir> 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 |