summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2019-09-03 11:05:27 +0200
committerErich Eckner <git@eckner.net>2019-09-03 11:05:27 +0200
commit2752805f691c1c18eb1b3b2bb2c5a9f3e722e6fb (patch)
tree51622591a755a695a32d4e6cb7909b2a0a631ab6
parent9cc9a3954adafb6c907303468cc4a96d5fbb8925 (diff)
downloadgpg-safe-import-master.tar.xz
gpg-safe-import: allow to import local keys first (useful for --refresh-keys)HEADmaster
-rwxr-xr-xgpg-safe-import3
1 files changed, 3 insertions, 0 deletions
diff --git a/gpg-safe-import b/gpg-safe-import
index eca63c2..662cc2c 100755
--- a/gpg-safe-import
+++ b/gpg-safe-import
@@ -3,6 +3,9 @@
tmp_dir=$(mktemp -d)
trap 'rm -rf --one-file-system "${tmp_dir}"' EXIT
+if ! stty 2>&1 >/dev/null; then
+ gpg --homedir "${tmp_dir}" --import
+fi
if ! gpg --homedir "${tmp_dir}" "$@"; then
>&2 echo 'gpg exited non-zero'
exit 1