]> gitweb.fluxo.info Git - utils-ssh.git/commitdiff
Ensure destination folder exists at ssh-keygen-wrapper
authorSilvio Rhatto <rhatto@riseup.net>
Sat, 9 Mar 2019 17:03:37 +0000 (14:03 -0300)
committerSilvio Rhatto <rhatto@riseup.net>
Sat, 9 Mar 2019 17:03:37 +0000 (14:03 -0300)
ssh-keygen-wrapper

index 9e6fd1a54a2c93e45735b662398bd92dfae16785..b9f9cbb582166aa2c89e6dace323a75a7c798d55 100755 (executable)
@@ -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"