From: Silvio Rhatto Date: Tue, 10 Dec 2013 20:48:53 +0000 (-0200) Subject: Adding mkdir action (#34) X-Git-Tag: 0.3~23 X-Git-Url: https://gitweb.fluxo.info/?a=commitdiff_plain;h=d3c34db2f307d86209235832db8b9c04a2942405;p=keyringer.git Adding mkdir action (#34) --- 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