summaryrefslogtreecommitdiff
path: root/lib/keyringer/actions/mkdir
diff options
context:
space:
mode:
Diffstat (limited to 'lib/keyringer/actions/mkdir')
-rwxr-xr-xlib/keyringer/actions/mkdir19
1 files changed, 19 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"