aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2019-03-09 14:03:37 -0300
committerSilvio Rhatto <rhatto@riseup.net>2019-03-09 14:03:37 -0300
commit1e9177b7913ea74502c0c6ff77428292c67210b4 (patch)
tree592cc9df96227034f4734527444c7677a75bd057
parent9ee18a2df0e8d86337cda05ea88ed6e44c5a5949 (diff)
downloadutils-ssh-1e9177b7913ea74502c0c6ff77428292c67210b4.tar.gz
utils-ssh-1e9177b7913ea74502c0c6ff77428292c67210b4.tar.bz2
Ensure destination folder exists at ssh-keygen-wrapper
-rwxr-xr-xssh-keygen-wrapper3
1 files changed, 3 insertions, 0 deletions
diff --git a/ssh-keygen-wrapper b/ssh-keygen-wrapper
index 9e6fd1a..b9f9cbb 100755
--- a/ssh-keygen-wrapper
+++ b/ssh-keygen-wrapper
@@ -24,5 +24,8 @@ if [ "$TYPE" == "rsa" ]; then
OPTS="-b 4096"
fi
+# Ensure destination folder exists
+mkdir -p $HOME/.ssh/keys/$TYPE
+
# Dispatch
ssh-keygen -t $TYPE $OPTS -f $HOME/.ssh/keys/$TYPE/$HANDLE -C "$HANDLE"