Parcourir la source

If the keys dir does not exists create it.

Stuart H Jimenez il y a 11 ans
Parent
commit
00a393f4ac
1 fichiers modifiés avec 4 ajouts et 0 suppressions
  1. 4 0
      bin/v-generate-api-key

+ 4 - 0
bin/v-generate-api-key

@@ -21,6 +21,10 @@ HASH=$(keygen)
 #                       Action                             #
 #----------------------------------------------------------#
 
+if [ ! -d ${KEYS} ]; then
+  mkdir ${KEYS}
+fi
+
 if [[ -e ${KEYS}${HASH} ]] ; then
     while [[ -e ${KEYS}${HASH} ]] ; do
         HASH=$(keygen)