summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2011-09-21 16:22:21 -0500
committerDan McGee <dan@archlinux.org>2011-09-22 11:15:45 -0500
commit595e1a437fab8d489736eff4811903aea4f5a38f (patch)
treeea06219b6c6825a27454e780e897dc960703e1ad
parent7d961c849bf4dab481e261bdb91304f6a4744d8c (diff)
pacman-key: implement promptless lsigning
Signed-off-by: Dan McGee <dan@archlinux.org>
-rw-r--r--scripts/pacman-key.sh.in5
1 files changed, 3 insertions, 2 deletions
diff --git a/scripts/pacman-key.sh.in b/scripts/pacman-key.sh.in
index 72614c6e..ad2eefe4 100644
--- a/scripts/pacman-key.sh.in
+++ b/scripts/pacman-key.sh.in
@@ -464,8 +464,9 @@ esac
(( INIT )) && initialize
(( LISTKEYS )) && "${GPG_PACMAN[@]}" --batch --list-keys "${KEYIDS[@]}"
(( LISTSIGS )) && "${GPG_PACMAN[@]}" --batch --list-sigs "${KEYIDS[@]}"
-# TODO: we can't do --batch on lsign until we figure out --command-fd
-(( LSIGNKEY )) && "${GPG_PACMAN[@]}" --lsign-key "${KEYIDS[@]}"
+if (( LSIGNKEY )); then
+ printf 'y\ny\n' | LANG=C "${GPG_PACMAN[@]}" --command-fd 0 --quiet --batch --lsign-key "${KEYIDS[@]}" 2>/dev/null
+fi
(( POPULATE )) && populate_keyring
(( RECEIVE )) && "${GPG_PACMAN[@]}" --recv-keys "${KEYIDS[@]}"
(( REFRESH )) && "${GPG_PACMAN[@]}" --refresh-keys "${KEYIDS[@]}"