aboutsummaryrefslogtreecommitdiffstats
path: root/import-priv-key
diff options
context:
space:
mode:
Diffstat (limited to 'import-priv-key')
-rwxr-xr-ximport-priv-key14
1 files changed, 14 insertions, 0 deletions
diff --git a/import-priv-key b/import-priv-key
new file mode 100755
index 0000000..f2595bf
--- /dev/null
+++ b/import-priv-key
@@ -0,0 +1,14 @@
+#!/bin/sh
+
+. ./config
+
+./unsplit-passphrase
+
+mkdir -p "$GPGHOMEDIR"
+chmod 700 "$GPGHOMEDIR"
+
+gpg --decrypt --passphrase-file "$passphrase" "$seckey_e" > "$seckey"
+rm -f "$passphrase"
+gpg --homedir "$GPGHOMEDIR" --import "$seckey"
+rm -f "$seckey"
+