summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xlib/keyringer/actions/mkdir19
-rw-r--r--share/man/keyringer.1.mdwn3
2 files changed, 22 insertions, 0 deletions
diff --git a/lib/keyringer/actions/mkdir b/lib/keyringer/actions/mkdir
new file mode 100755
index 0000000..b31eb0b
--- /dev/null
+++ b/lib/keyringer/actions/mkdir
@@ -0,0 +1,19 @@
+#!/bin/bash
+#
+# Create folders.
+#
+
+# Load functions
+LIB="`dirname $0`/../functions"
+source "$LIB" || exit 1
+
+# Aditional parameters
+CWD="`pwd`"
+
+# Avoid leading slash
+shift
+ARGS="`echo "$*" | sed -e "s|^/*||"`"
+
+# Run mkdir command
+cd "$KEYDIR/$RELATIVE_PATH" && mkdir -p $ARGS
+cd "$CWD"
diff --git a/share/man/keyringer.1.mdwn b/share/man/keyringer.1.mdwn
index b383507..f8d243e 100644
--- a/share/man/keyringer.1.mdwn
+++ b/share/man/keyringer.1.mdwn
@@ -56,6 +56,9 @@ ls <*path*>
if *path* is specified. Like the git wrapper, this is a wrapper around the *LS(1)*
command.
+mkdir <*path*>
+: Create a directory inside the repository *keys* folder.
+
tree <*path*>
: List contents from the toplevel repository *keys* folder or from relative paths
if *path* is specified using a tree-like format. Like the ls wrapper, this is a