diff options
author | Silvio Rhatto <rhatto@riseup.net> | 2013-12-10 18:48:53 -0200 |
---|---|---|
committer | Silvio Rhatto <rhatto@riseup.net> | 2013-12-10 18:48:53 -0200 |
commit | d3c34db2f307d86209235832db8b9c04a2942405 (patch) | |
tree | 5baa319091bc739d9bd4643e95d87d063c79d136 /lib | |
parent | 2409a2c5bcdfd43c61072545e23148e9e9c6ca67 (diff) | |
download | keyringer-d3c34db2f307d86209235832db8b9c04a2942405.tar.gz keyringer-d3c34db2f307d86209235832db8b9c04a2942405.tar.bz2 |
Adding mkdir action (#34)
Diffstat (limited to 'lib')
-rwxr-xr-x | lib/keyringer/actions/mkdir | 19 |
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" |