]> gitweb.fluxo.info Git - keyringer.git/commitdiff
Adding mkdir action (#34)
authorSilvio Rhatto <rhatto@riseup.net>
Tue, 10 Dec 2013 20:48:53 +0000 (18:48 -0200)
committerSilvio Rhatto <rhatto@riseup.net>
Tue, 10 Dec 2013 20:48:53 +0000 (18:48 -0200)
lib/keyringer/actions/mkdir [new file with mode: 0755]
share/man/keyringer.1.mdwn

diff --git a/lib/keyringer/actions/mkdir b/lib/keyringer/actions/mkdir
new file mode 100755 (executable)
index 0000000..b31eb0b
--- /dev/null
@@ -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"
index b383507f887d0fd18a3b94f36e82d666ec8ccf90..f8d243edccba870cfc2101253ae1136c189cc19d 100644 (file)
@@ -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