summaryrefslogtreecommitdiffstats
path: root/libexec/container/key
diff options
context:
space:
mode:
Diffstat (limited to 'libexec/container/key')
-rwxr-xr-xlibexec/container/key9
1 files changed, 7 insertions, 2 deletions
diff --git a/libexec/container/key b/libexec/container/key
index 4cc62dc..6c9c8c1 100755
--- a/libexec/container/key
+++ b/libexec/container/key
@@ -76,7 +76,7 @@ Parameters ()
Usage ()
{
- echo "Usage: ${PROGRAM} ${COMMAND} [-a|--add KEY] [-l|--list] [-r|--remove KEY]" >&2
+ echo "Usage: ${PROGRAM} ${COMMAND} [-a|--add KEY_FILE|KEY_ID] [-l|--list] [-r|--remove KEY|KEY_ID]" >&2
exit 1
}
@@ -140,7 +140,12 @@ fi
case "${ACTION}" in
add)
- gpg --homedir "${KEYS}" --import "${ADD}"
+ if [ -e "${ADD}" ]
+ then
+ gpg --homedir "${KEYS}" --import "${ADD}"
+ else
+ gpg --homedir "${KEYS}" --recv "${ADD}"
+ fi
;;
list)